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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using BPEL to relay a web service" Watch "Using BPEL to relay a web service" New topic

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, {}CitizensAccountIntf
Duplicate Binding: SubmitMessageSoapHttp, {}SubmitMessageSoapHttp
Duplicate SLT: CitizensAccountIntfLinkType,
copying Sub-Assembly: D:\SOASamples\LocalCASRelayCompositeApp\build\LocalCASRelay.jar
***Warning: 1 or more consumers with 2 ports [{}CitizensAccountIntf]
Port[0]: : CASRelay, {}SubmitMessageSoapHttp
Port[1]: : CASEndpointBean, {}SubmitMessageSoapHttp
Deleting: D:\SOASamples\LocalCASRelayCompositeApp\build\BCDeployment.jar
Created dir: D:\SOASamples\LocalCASRelayCompositeApp\dist
Building jar: D:\SOASamples\LocalCASRelayCompositeApp\dist\
Error parsing XML: Connection timed out: connect
Deploying a service assembly...
Starting a service assembly...
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.


xmlns:wsdlNS="" xmlns:ns1="" xmlns:ns2="">
<import namespace="" location="CASRelay.wsdl" importType=""/>
<import namespace="" location="Partners/CASEndpointBean/CASEndpointBean.wsdl" importType=""/>
<partnerLink name="CASEndpoint" partnerLinkType="ns2:CitizensAccountIntfLinkType" partnerRole="CitizensAccountIntfRole"/>
<partnerLink name="LCASRelay" partnerLinkType="ns2:CitizensAccountIntfLinkType" myRole="CitizensAccountIntfRole"/>
<variable name="SendCitizenAccountMessageOutRelay" messageType="ns2:CitizenAccountMessageSoapOut"/>
<variable name="SendCitizenAccountMessageInRelay" messageType="ns2:CitizenAccountMessageSoapIn"/>
<variable name="SendCitizenAccountMessageIn" messageType="ns2:CitizenAccountMessageSoapIn"/>
<receive name="LCASReceive" createInstance="yes" partnerLink="LCASRelay" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf" variable="SendCitizenAccountMessageIn"/>
<assign name="Assign">
<from variable="SendCitizenAccountMessageIn"/>
<to variable="SendCitizenAccountMessageIn"/>
<invoke name="InvokeCAS" partnerLink="CASEndpoint" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf" inputVariable="SendCitizenAccountMessageInRelay" outputVariable="SendCitizenAccountMessageOutRelay"/>
<reply name="CASReply" partnerLink="LCASRelay" operation="sendCitizenAccountMessage" portType="ns2:CitizensAccountIntf"/>


John Coleman, MSTA<br />Sun Certified Programmer for the Java� 2 Platform<br /><br />Eurobase banking solutions<br /><a href="" target="_blank" rel="nofollow"></a>
Don't get me started about those stupid light bulbs.
subject: Using BPEL to relay a web service
jQuery in Action, 3rd edition