A service assembly can have connections across its boundary to endpoints of external
service units within the same JBI run-time. In this example, the CASA editor is used to make a connection to an
endpoint of an external service unit of another composite application.
There is a bug in NetBeans 6.1 that causes the drag-n-drop of external service unit described in step 8 to fail. You can either:
or
The DnD of external SU feature was broken in NB6.1. A fix was checked in into NetBeans trunk in late April, see
You will need to use the NB trunk build to run this example. You can download the latest version from the following link:
NOTE: Please download and install the full NB version, e.g., netbeans-hudson-trunk-nnnn.zip
The enclosed zip file contains test projects used in this example. Please download it and unzip the content to a local directory.
There are four projects included in this example:
Starts the NetBeans IDE and load all four projects.
Open service assembly of asyncServiceCA in CASA. It shows only a BPEL service unit without any connection.
Start the GlassFish server from NetBeans services tab or from the command line.
Deploy the asyncServiceCA project to GlassFish. Open the JBI manager node to see the deployed service assembly (asyncServiceCA) and service unit (asyncServiceCA-asyncService).
Open service assembly of asyncClientCA in CASA. It shows a BPEL service unit and a SOAP wsdl port exposing the service.
Drag the external service unit (asyncServiceCA-asyncService) from JBI manager and drop it in the external module area of CASA.
NOTE: If you are using NetBeans 6.1, please skip this step and use alternative steps described in Section 5 to define the external service unit manually.
Connect the consume endpoint from the bpel service unit to the provide endpoint of the external service unit.
Deploy the asyncClientCA project to GlassFish. Open the JBI manager node to see the deployed service assembly (asyncClientCA ) and two service units (asyncClientCA-asyncClient and asyncClientCA-sun-http-binding).
We now have two service assemblies deployed, asyncClientCA and asyncSeviceCA. There is a connection across the service assembly boundary from an endpoint of a service unit in asyncClientCA to an ednpoint of another service unit in asyncSeviceCA.
Define a test case in asyncClientCA project using:
and, e.g., the following input.xml as the test message.
Run the test case and check the test output. It should echo input data as shown in the following output message:
In cases, when one does not have the access to deployed external service units directly using JBI manager, one can define external service units manually in CASA.
Select the external service unit palette item from the CASA palette and drag-n-drop it in the external module area in CASA.
Select the provides endpoint palette item from the CASA palette and drag-n-drop it in the external service unit defined in the last step.
Select the external provides endpoint, so that endpoint properties are shown in the property panel. Most of them are undefined at this point.
The endpoint property values can be found in the jbi.xml of the external service unit. Open the jbi.xml in the service unit jar of the external service assembly to locate required endpoint property values for:
Click on the edit button in the Interface Name property and input the values copied from SU jbi.xml.
NOTE: you may need to define a new namespace if it is not already defined.
Click on the edit button in the Service Name property and input the values copied from SU jbi.xml.
NOTE: you may need to define a new namespace if it is not already defined.
Click on the Endpoint Name property and input the values copied from SU jbi.xml.
Connect the consume endpoint from the bpel service unit to the provide endpoint of the external service unit.