Greetings, I'm trying to get a BPEL process working with a long running web service using a callback but have run into some problems relating to discrepancies between the callback service and port details provided to the service provider, and those exposed by the BPEL process implementing the callback.
Here's a summary of observations of relevant behaviour and constraints which don't seem to mix well: 1. Correspondence required between service and port in deploy.xml and those in the supplied WSDL. 2. No correspondence between port type, service and port in supplied WSDL and those in generated WSDL service. 3. Correspondence between service and port in supplied WSDL and those in callback EPR generated from partner link This means that while the callback EPR generated from "my role" of the partner link representing the interaction with AsyncProcess service provider reflects the supplied WSDL, it does not reflect the actual (generated WSDL) and consequently causes failure in the external service provider because the callback EPR cannot be resolved. Note (for anyone trying something similar) that there are a couple of other issues which undermine this approach, but they are distinct from this issue. If these features are intentional, and somehow I am misusing ODE, could someone suggest how partner links are to be used to generate a callback EPR which is useable by an external service provider? If this is a bug, either the callback EPR generated from the partner link should be changed to reflect the service and port in the generated WSDL, or the the generated WSDL should be more closely synchronised with the provided WSDL. I realise that the issue may be complicated by the provision of ports corresponding to bindings for soap 1.1, soap 1.2, and http, and the question of which of them to provide in the callback EPR. Below are the relevant fragments from various documents used to implement the BPEL process. Please excuse any typos as I have trimmed and modified them from the actual documents. The BPEL process was built from an example, and the HelloPortType-related parts are not relevant to the problem. Regards, Callum. The WSDL for the external service (AsyncProcess.wsdl): <wsdl:definitions targetNamespace="http://mycompany.com.au/asyncprocess" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:awstyp="http://mycompany.com.au/asyncprocess/types" xmlns:tns="http://mycompany.com.au/asyncprocess"> <wsdl:message name="EndpointMessage"> <wsdl:part name="payload" element="wsa:EndpointReference" /> </wsdl:message> <wsdl:message name="asyncProcessRequestMessage"> <wsdl:part element="awstyp:asyncProcessRequest" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="asyncProcessResponseMessage"> <wsdl:part element="awstyp:asyncProcessResponse" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="onAsyncProcessResultRequestMessage"> <wsdl:part element="awstyp:onAsyncProcessResultRequest" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:portType name="AsyncProcess"> <wsdl:operation name="asyncProcess"> <wsdl:input message="tns:asyncProcessRequestMessage"> </wsdl:input> <wsdl:output message="tns:asyncProcessResponseMessage"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:portType name="AsyncProcessCallback"> <wsdl:operation name="onAsyncProcessResult"> <wsdl:input message="tns:onAsyncProcessResultRequestMessage"> </wsdl:input> </wsdl:operation> </wsdl:portType> <wsdl:service name="AsyncProcessService"> <wsdl:port binding="tns:AsyncProcessServiceSoapBinding" name="AsyncProcessPort"> <soap:address location="http://localhost:8083/asyncws-1.0.0/AsyncServiceProvider" /> </wsdl:port> </wsdl:service> <bpws:property name="correlatorProp" type="xs:long" /> <bpws:propertyAlias messageType="tns:asyncProcessResponseMessage" part="parameters" propertyName="tns:correlatorProp"> <bpws:query>//correlationId</bpws:query> </bpws:propertyAlias> <bpws:propertyAlias messageType="tns:onAsyncProcessResultRequestMessage" part="parameters" propertyName="tns:correlatorProp"> <bpws:query>//correlationId</bpws:query> </bpws:propertyAlias> <plnk:partnerLinkType name="AsyncProcessPartnerLinkType"> <plnk:role name="serviceProvider" portType="tns:AsyncProcess"> </plnk:role> <plnk:role name="serviceConsumer" portType="tns:AsyncProcessCallback"> </plnk:role> </plnk:partnerLinkType> </wsdl:definitions> The schema for external service provider: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://mycompany.com.au/asyncprocess/types" xmlns:wsa="http://www.w3.org/2005/08/addressing" targetNamespace="http://mycompany.com.au/asyncprocess/types" elementFormDefault="qualified"> <xs:complexType name="AsyncProcessRequestType"> <xs:sequence> <xs:element ref="wsa:EndpointReference" /> </xs:sequence> </xs:complexType> <xs:complexType name="AsyncProcessResponseType"> <xs:sequence> <xs:element minOccurs="0" name="correlationId" type="xs:long" /> </xs:sequence> </xs:complexType> <xs:complexType name="OnAsyncProcessResultRequestType"> <xs:sequence> <xs:element minOccurs="0" name="correlationId" type="xs:long" /> </xs:sequence> </xs:complexType> <xs:element name="asyncProcessRequest" type="tns:AsyncProcessRequestType" /> <xs:element name="asyncProcessResponse" type="tns:AsyncProcessResponseType" /> <xs:element name="onAsyncProcessResultRequest" type="tns:OnAsyncProcessResultRequestType" /> </xs:schema> The supplied WSDL for BPEL process: <wsdl:definitions targetNamespace="http://ode/bpel/unit-test.wsdl" xmlns:ns0="http://mycompany.com.au/asyncprocess" xmlns:tns="http://ode/bpel/unit-test.wsdl"> <wsdl:import location="AsyncProcess.wsdl" namespace="http://mycompany.com.au/asyncprocess" /> <wsdl:message name="HelloMessage"> <wsdl:part name="TestPart" type="xsd:string" /> </wsdl:message> <wsdl:portType name="HelloPortType"> <wsdl:operation name="hello"> <wsdl:input message="tns:HelloMessage" name="TestIn" /> <wsdl:output message="tns:HelloMessage" name="TestOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="hello"> <soap:operation soapAction="" style="rpc" /> <wsdl:input> <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal" /> </wsdl:input> <wsdl:output> <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="AsyncProcessCallbackBinding" type="ns0:AsyncProcessCallback"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="onAsyncProcessResult"> <soap:operation /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:service name="HelloService"> <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> <soap:address location="http://localhost:8081/ode/processes/helloWorld2" /> </wsdl:port> </wsdl:service> <wsdl:service name="AsyncProcessCallbackService"> <wsdl:port name="AsyncProcessCallbackPort" binding="tns:AsyncProcessCallbackBinding"> <soap:address location="http://localhost:8081/ode/processes/asyncProcessCallbackService" /> </wsdl:port> </wsdl:service> <plnk:partnerLinkType name="HelloPartnerLinkType"> <plnk:role name="me" portType="tns:HelloPortType" /> <plnk:role name="you" portType="tns:HelloPortType" /> </plnk:partnerLinkType> </wsdl:definitions> The BPEL process definition: <process name="MyApp" xmlns:test="http://ode/bpel/unit-test.wsdl" xmlns:ns0="http://mycompany.com.au/asyncprocess" xmlns:ns1="http://www.w3.org/2005/08/addressing"> <partnerLinks> <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" /> <partnerLink name="AsyncProcPartnerLink" partnerLinkType="ns0:AsyncProcessPartnerLinkType" myRole="serviceConsumer" partnerRole="serviceProvider" /> </partnerLinks> <variables> <variable name="myVar" messageType="test:HelloMessage" /> <variable name="onAsyncProcResultReqMsg" messageType="ns0:onAsyncProcessResultRequestMessage" /> <variable name="asyncProcRespMsgVar" messageType="ns0:asyncProcessResponseMessage" /> <variable name="asyncProcReqMsgVar" messageType="ns0:asyncProcessRequestMessage" /> <variable name="myEndpoint" messageType="ns0:EndpointMessage" /> </variables> <correlationSets> <correlationSet name="CorrelationSetAsyncService" properties="ns0:correlatorProp" /> </correlationSets> <sequence> <receive name="start" partnerLink="helloPartnerLink" portType="test:HelloPortType" operation="hello" variable="myVar" createInstance="yes" /> <assign name="Assign2"> <copy> <from partnerLink="AsyncProcPartnerLink" endpointReference="myRole" /> <to variable="myEndpoint" part="payload" /> </copy> </assign> <assign name="Assign5"> <copy> <from>$myEndpoint.payload/ns1:EndpointReference</from> <to> $asyncProcReqMsgVar.parameters/ns1:EndpointReference </to> </copy> </assign> <invoke name="Invoke1" partnerLink="AsyncProcPartnerLink" operation="asyncProcess" portType="ns0:AsyncProcess" inputVariable="asyncProcReqMsgVar" outputVariable="asyncProcRespMsgVar"> <correlations> <correlation set="CorrelationSetAsyncService" initiate="yes" pattern="response" /> </correlations> </invoke> <receive name="Receive1" createInstance="no" partnerLink="AsyncProcPartnerLink" operation="onAsyncProcessResult" portType="ns0:AsyncProcessCallback" variable="onAsyncProcResultReqMsg"> <correlations> <correlation set="CorrelationSetAsyncService" initiate="no" /> </correlations> </receive> <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType" operation="hello" variable="myVar" /> </sequence> </process> The deployment descriptor: <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:ns0="http://mycompany.com.au/asyncprocess" xmlns:pns="http://ode/bpel/unit-test" xmlns:wns="http://ode/bpel/unit-test.wsdl"> <process name="pns:MyApp"> <active>true</active> <provide partnerLink="helloPartnerLink"> <service name="wns:HelloService" port="HelloPort" /> </provide> <provide partnerLink="AsyncProcPartnerLink"> <service name="wns:AsyncProcessCallbackService" port="AsyncProcessCallbackPort" /> </provide> <invoke partnerLink="AsyncProcPartnerLink"> <service name="ns0:AsyncProcessService" port="AsyncProcessPort" /> </invoke> </process> </deploy> The generated WSDL for the callback service: <wsdl:definitions xmlns:tns="http://ode/bpel/unit-test.wsdl" targetNamespace="http://ode/bpel/unit-test.wsdl"> <wsdl:portType name="asyncProcessCallbackServicePortType"> <wsdl:operation name="onAsyncProcessResult"> <wsdl:input message="tns:onAsyncProcessResultRequestMessage" wsaw:Action="http://ode/bpel/unit-test.wsdl/AsyncProcessCallback/onAsyncProcessResult" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="asyncProcessCallbackServiceSOAP11Binding" type="tns:asyncProcessCallbackServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <wsdl:operation name="onAsyncProcessResult"> <soap:operation soapAction="" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:binding name="asyncProcessCallbackServiceSOAP12Binding" type="tns:asyncProcessCallbackServicePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <wsdl:operation name="onAsyncProcessResult"> <soap12:operation soapAction="" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:binding name="asyncProcessCallbackServiceHttpBinding" type="tns:asyncProcessCallbackServicePortType"> <http:binding verb="POST" /> <wsdl:operation name="onAsyncProcessResult"> <http:operation location="asyncProcessCallbackService/onAsyncProcessResult" /> <wsdl:input> <mime:content type="text/xml" part="onAsyncProcessResult" /> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:service name="asyncProcessCallbackService"> <wsdl:port name="asyncProcessCallbackServiceSOAP11port_http" binding="tns:asyncProcessCallbackServiceSOAP11Binding"> <soap:address location="http://localhost:8081/ode/processes/asyncProcessCallbackService" /> </wsdl:port> <wsdl:port name="asyncProcessCallbackServiceSOAP12port_http" binding="tns:asyncProcessCallbackServiceSOAP12Binding"> <soap12:address location="http://localhost:8081/ode/processes/asyncProcessCallbackService" /> </wsdl:port> <wsdl:port name="asyncProcessCallbackServiceHttpport" binding="tns:asyncProcessCallbackServiceHttpBinding"> <http:address location="http://localhost:8081/ode/processes/asyncProcessCallbackService" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
