ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Callum Haig" <callum.h...@googlemail.com>
Subject Re: Discrepancy between supplied and generated service and port make EPR for partner link unuseable as callback EPR
Date Wed, 23 Jul 2008 13:27:57 GMT
Hi Matthieu,

Your understanding of my situation was correct.  I tried your first
suggestion and found  that the endpoint reference could be resolved in
my service.  I did not try your second approach.

>From your description of the cause it sounds as though a remedy might
require more pervasive changes than those required to make the
original WSDL available at a particular location in the web app (until
you decide to directly swap the original WSDL for the Axis one).

Consider a simple code change I made to accompany my BPEL process,
which I have formalised as a Jira improvement (ODE-347, patch
submitted).  The change renders a wsdlLocation attribute in the
Metadata element of the endpoint reference corresponding to the
callback endpoint exposed by the BPEL process.  The value of the
attribute is simply the callback port address with "?wsdl" appended.
This will not succeed until the real WSDL is made available, either at
the same location, or at another location which can be recovered in
that context.  I imagine providing another location will require a set
of cascading changes.

Thanks for your help.

Callum.

On 7/22/08, Matthieu Riou <matthieu@offthelip.org> wrote:
> On Sat, Jul 19, 2008 at 1:17 AM, Callum Haig <callum.haig@googlemail.com>
>  wrote:
>
>
>  > 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.
>  >
>
>
> So if I understand correctly your issue, the differences between the real
>  WSDL, whose EPR is sent to your service, and the generated WSDL consumed by
>  your service, create a conflict at your service level, is that right?
>
>  Our problem here is that Axis2 is rewriting parts of the process WSDL you
>  deploy in ODE. So if you use that WSDL and have a use case where those
>  differences matter, it breaks.
>
>
>
>  >
>  > 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?
>  >
>
>
> There are basically two possibilities to make this work and both of them
>  require *not* using the WSDL generating by Axis2:
>
>    - Instead of pointing your service to the ?wsdl URL, point it to the
>    original WSDL file that you have and deployed in ODE.
>    - I recently added an alternate webapp to attempt to solve this problem.
>    You will need to build the latest source from the 1.X branch as it hasn't
>    been included in our 1.2 release. With this build, if you navigate to
>    http://localhost:8080/ode/deployment/ you will get an alternate view of
>    your deployments where your original WSDL can be retrieved. The only
>    shortcoming is that it's a different URL than the ?wsdl provided by Axis2.
>    We can't have 2 different things at the same URL and I didn't want to
>    completely short-circuit the Axis2 WSDL yet.
>
>  Let me know how this goes.
>
>
>  Matthieu
>
>
>
>  >
>  > 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>
>  >
>

Mime
View raw message