This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136199 - SQL module endpoints are not automatically wired in CASA
Summary: SQL module endpoints are not automatically wired in CASA
Status: STARTED
Alias: None
Product: soa
Classification: Unclassified
Component: Composite Application (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P3 blocker (vote)
Assignee: Tientien Li
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-30 21:26 UTC by lpolycarpou
Modified: 2008-10-01 14:04 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
casa-sqlmodules-unwired (39.41 KB, image/jpeg)
2008-06-02 14:25 UTC, lpolycarpou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lpolycarpou 2008-05-30 21:26:05 UTC
When a SQL module [A] and a BPEL module [B] (which uses [A] as a partner role) are added in a new Comp App, there is no
connection made between the consumer [B] and provider endpoint [A] when performing a manual build.  This is not the case
for other modules such as Java EE, XSLT SE which are automatically wired when doing a build for the first time.

To reproduce:

1) Create a new SQL project, define the connectivityInfo and a simple SQL update.sql
2) Generate the WSDL for that SQL module
3) Create a new BPEL project
4) Create a simple abstract WSDL for the BPEL
5) Create a new BPEL process file
6) DnD the SQL WSDL partner to invoke to the RHS swimlane (partnerLink1)
7) DnD the BPEL WSDL partner to implement to the LHS swimlane (partnerLink2)
8) Create Receive, Assign1, Invoke, Assign2, Reply activities
9) Create default variables and connect Receive & Reply to partnerLink2
10) Create default variables and connect Invoke to partnerLink1
11) Map some assignments for input and output
12) Build the BPEL and SQL projects
13) Create a comp app
14) Add JBI Modules for the BPEL and SQL projects
15) Select the "Build Project" icon in the CASA editor
16) The module endpoints are added but there is no link automatically made between the BPEL module and the SQL module

The solution is to add the link manually but why does this only apply to the SQL module?  I have not had to do this for
XSLT or JavaEE modules.
Comment 1 Tientien Li 2008-05-30 21:42:09 UTC
Can you provide test projects for this problem? Thanks
Comment 2 lpolycarpou 2008-06-02 14:24:29 UTC
Yes, as I've stated in the accompanying emails on the sierra-feedback alias, you can use these projects on SWAN:

http://wikihome.sfbay.sun.com/fast/attach/Nokia_080310%2Ftmwdemo-moms-compapp.zip 

Try creating a new comp app and adding all the modules (except the existing comp app) from the above zip.  Perform a
build.  All modules are wired except the SQL modules.  See attached image for more info.
Comment 3 lpolycarpou 2008-06-02 14:25:15 UTC
Created attachment 62251 [details]
casa-sqlmodules-unwired
Comment 4 Tientien Li 2008-06-02 20:48:51 UTC
Thanks, we will take a look at the test case.
Comment 5 lpolycarpou 2008-06-02 21:07:15 UTC
Thanks.  Can you confirm that all modules should automatically be wired and if there are any use cases that may result
in this being ambiguous that you can think of?
Comment 6 Jun Qian 2008-06-04 00:41:27 UTC
The WSDL file generated by the SQL project no longer contains a default soap binding. This causes the following warning
message during compapp build and therefore the automatic wiring involving SQL endpoint is missing.

    WARNING: PORT w/o address: {http://com.sun.jbi/sqlse/sqlseengine}sqlUpdateTT_sqlsePortType

If this change in SQL project is by design, then the following patch in compapp seems to address the issue: 

diff -r 9fca8e6fea22 compapp.projects.jbi/antsrc/org/netbeans/modules/compapp/projects/jbi/anttasks/ConnectionResolver.java
--- a/compapp.projects.jbi/antsrc/org/netbeans/modules/compapp/projects/jbi/anttasks/ConnectionResolver.java	Mon Jun 02
10:42:00 2008 -0700
+++ b/compapp.projects.jbi/antsrc/org/netbeans/modules/compapp/projects/jbi/anttasks/ConnectionResolver.java	Tue Jun 03
16:34:51 2008 -0700
@@ -162,7 +162,7 @@
                 QName ptQName = p.getBinding().get().getType().getQName();
                 if (bcName == null) { // report error.. no binding
                     log("WARNING: PORT w/o address: " + ptQName, Project.MSG_WARN);
-                } else {                    
+                } //else {                    
                     // Create the endpoint for port
                     Service sv = (Service) p.getParent();
                     String tns = p.getModel().getDefinitions().getTargetNamespace();
@@ -194,7 +194,7 @@
                             addConnection(con, false, bcName);
                         }
                     }
-                }
+                //}
                 
             } else if (numPorts == 0) { // no external port...
                 // report unused wsdl port, or internal connection
@@ -331,6 +331,9 @@
             boolean isConsumeAPort, String bcName) {
         
         addConnection(connection);
+        
+        if (bcName == null) 
+            return;
         
         List<Connection>[] cmap = bcConnections.get(bcName);
Comment 7 Sergey Lunegov 2008-10-01 14:04:52 UTC
Changed target milestone.