wood burning stoves 2.0*
The moose likes Web Services and the fly likes Using BPEL to relay a web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using BPEL to relay a web service" Watch "Using BPEL to relay a web service" New topic
Author

Using BPEL to relay a web service

John Coleman
Ranch Hand

Joined: Jul 24, 2001
Posts: 65
I have an unusual web service that I've implemented using BPEL. All it is required to do is accept the message on an inbound port and hand the same message over to a remote web service port, then relay the reply back.

The problem is that since both partner links use the same WSDL (accept the port address of course), there is duplication of some element, like the operations for example. When I build a composite application using the process, it will not build or deploy:

Duplicate PT: CitizensAccountIntf, {http://www.entity.uk/service}CitizensAccountIntf
Duplicate Binding: SubmitMessageSoapHttp, {http://www.entity.uk/service}SubmitMessageSoapHttp
Duplicate SLT: CitizensAccountIntfLinkType, http://www.entity.uk/service
copying Sub-Assembly: D:\SOASamples\LocalCASRelayCompositeApp\build\LocalCASRelay.jar
***Warning: 1 or more consumers with 2 ports [{http://www.entity.uk/service}CitizensAccountIntf]
Port[0]: : CASRelay, {http://www.entity.uk/service}SubmitMessageSoapHttp
Port[1]: : CASEndpointBean, {http://www.entity.uk/service}SubmitMessageSoapHttp
Deleting: D:\SOASamples\LocalCASRelayCompositeApp\build\BCDeployment.jar
Created dir: D:\SOASamples\LocalCASRelayCompositeApp\dist
Building jar: D:\SOASamples\LocalCASRelayCompositeApp\dist\LocalCASRelayCompositeApp.zip
run-jbi-deploy:
Error parsing XML: java.net.ConnectException: Connection timed out: connect
[deploy-service-assembly]
Deploying a service assembly...
host=localhost
port=4848
file=D:\SOASamples\LocalCASRelayCompositeApp/dist/LocalCASRelayCompositeApp.zip
[start-service-assembly]
Starting a service assembly...
host=localhost
port=4848
name=LocalCASRelayCompositeApp
Failed execution of Start
ERROR: (JBIMA1202) Lifecycle command startServiceAssembly failed for LocalCASRelayCompositeApp :
* Component: com.sun.bpelse-1.0-2
ERROR: (BPELSE) Service unit failed to load deployment Error while loading BPEL file C:\Sun\SDK\domains\domain1\jbi\system\deployment\LocalCASRelayCompositeApp\com.sun.bpelse-1.0-2_LocalCASRelayCompositeApp-LocalCASRelay\LCASRelay.bpel, Exception details are Cannot parse BPEL
D:\SOASamples\LocalCASRelayCompositeApp\nbproject\build-impl.xml:214: Service assembly deployment failed.
BUILD FAILED (total time: 31 seconds)

Is there a neat way around this? Please show by example code if you can.

TIA
John


<process
name="LCASRelay"
targetNamespace="http://enterprise.netbeans.org/bpel/LCASRelay"
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:wsdlNS="http://enterprise.netbeans.org/bpel/LCASRelay" xmlns:ns1="http://service.entity.uk/" xmlns:ns2="http://www.entity.uk/service">
<import namespace="http://www.entity.uk/service" location="CASRelay.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="http://www.entity.uk/service" location="Partners/CASEndpointBean/CASEndpointBean.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="CASEndpoint" partnerLinkType="ns2:CitizensAccountIntfLinkType" partnerRole="CitizensAccountIntfRole"/>
<partnerLink name="LCASRelay" partnerLinkType="ns2:CitizensAccountIntfLinkType" myRole="CitizensAccountIntfRole"/>
</partnerLinks>
<variables>
<variable name="SendCitizenAccountMessageOutRelay" messageType="ns2:CitizenAccountMessageSoapOut"/>
<variable name="SendCitizenAccountMessageInRelay" messageType="ns2:CitizenAccountMessageSoapIn"/>
<variable name="SendCitizenAccountMessageIn" messageType="ns2:CitizenAccountMessageSoapIn"/>
</variables>
<sequence>
<receive name="LCASReceive" createInstance="yes" partnerLink="LCASRelay" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf" variable="SendCitizenAccountMessageIn"/>
<assign name="Assign">
<copy>
<from variable="SendCitizenAccountMessageIn"/>
<to variable="SendCitizenAccountMessageIn"/>
</copy>
</assign>
<invoke name="InvokeCAS" partnerLink="CASEndpoint" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf" inputVariable="SendCitizenAccountMessageInRelay" outputVariable="SendCitizenAccountMessageOutRelay"/>
<reply name="CASReply" partnerLink="LCASRelay" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf"/>
</sequence>

</process>


John Coleman, MSTA<br />Sun Certified Programmer for the Java� 2 Platform<br />john.coleman@eurobase-international.com<br />Eurobase banking solutions<br /><a href="http://www.eurobase-international.com/banking" target="_blank" rel="nofollow">http://www.eurobase-international.com/banking</a>
 
jQuery in Action, 2nd edition
 
subject: Using BPEL to relay a web service