ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert" <boisv...@intalio.com>
Subject Re: I need help to make the Magic Session sample work in ServiceMix
Date Tue, 18 Sep 2007 16:50:43 GMT
Hi Simon,

The stateful exchange protocol (aka magic sessions) is not currently
supported through JBI.  It would require minor additions to the JBI
integration in Ode, as probably the Http binding component in ServiceMix.
Not a huge deal, we just need somebody motivated enough! :)

alex


On 9/18/07, Simon Sekat <sekatsimon@gmail.com> wrote:
>
> I created a service assembly that includes two service units - a HTTP
> service unit and an ODE service unit.  The HTTP service unit merely
> proxies
> requests coming into the ODE service unit.
>
> After I successfully deployed those two service units into ServiceMix, I
> have the following URLs available
>
> http://localhost:8080/ode/processes/MSResponderService/
> http://localhost:8080/ode/processes/MSMainExecuteService/
> http://localhost:8080/ode/processes/MSMainService/
>
> But when I invoke the ODE by sending the following soap request to
> http://localhost:8080/ode/processes/MSMainExecuteService (as instructed by
> the readme.txt came along with the magic session), I got an error saying
> that "Error in deployment descriptor for process unknown partner link
> responderPartnerLink".
>
> Please help me making the magic session sample work.  I need this to
> assess
> how ODE can be used to correlate requests with sessions.  Thank you.
>
> ------------------------------- <soap request>
> -------------------------------------
> <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:unit="http://ode/bpel/unit-test.wsdl">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <unit:execute>fire!</unit:execute>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> -------------------------------
> deploy.xml-------------------------------------
> <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
>     xmlns:main="http://ode/bpel/unit-test "
>     xmlns:mws="http://ode/bpel/unit-test.wsdl"
>     xmlns:resp="http://ode/bpel/responder">
>
>     <process name="main:MagicSessionMain">
>         <provide partnerLink="executePartnerLink">
>             <service name="mws:MSMainExecuteService"
> port="MSExecutePort"/>
>         </provide>
>         <provide partnerLink="responderPartnerLink">
>             <service name="mws:MSMainService" port="MSMainPort"/>
>         </provide>
>         <invoke partnerLink="responderPartnerLink">
>             <service name="mws:MSResponderService"
> port="MSResponderPort"/>
>         </invoke>
>     </process>
>     <process name="resp:MagicSessionResponder">
>                 <type>resp:MagicSessionResponder</type>
>         <provide partnerLink="mainPartnerLink">
>             <service name="mws:MSResponderService"
> port="MSResponderPort"/>
>         </provide>
>         <invoke partnerLink="mainPartnerLink">
>             <service name="mws:MSMainService" port="MSMainPort"/>
>         </invoke>
>     </process>
> </deploy>
>
>
> --------------------------------
> main.wsdl------------------------------------
> <?xml version="1.0" encoding="utf-8" ?>
> <!--
>     example copied from
>
>
> https://svn.apache.org/viewvc/ode/trunk/distro/src/examples-war/MagicSession/
>   -->
>
> <wsdl:definitions
>         targetNamespace="http://ode/bpel/unit-test.wsdl"
>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>         xmlns:tns="http://ode/bpel/unit-test.wsdl"
>         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>         xmlns:wsa="http://www.w3.org/2005/08/addressing"
>         xmlns:smix="http://servicemix.org/wsdl/jbi/"
>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
>
>     <types>
>         <xsd:element name="result" type="xsd:string"/>
>         <xsd:element name="execute" type="xsd:string"/>
>         <xsd:element name="callback" type="xsd:string"/>
>         <xsd:element name="doubleCallback" type="xsd:string"/>
>         <xsd:element name="tripleCallback" type="xsd:string"/>
>         <xsd:element name="initiate" type="xsd:string"/>
>         <xsd:element name="doubleCall" type="xsd:string"/>
>         <xsd:element name="tripleCall" type="wsa:EndpointReference"/>
>     </types>
>
>     <wsdl:message name="ExecuteMessage">
>         <wsdl:part name="payload" element="tns:execute"/>
>     </wsdl:message>
>
>     <wsdl:message name="CallbackMessage">
>         <wsdl:part name="payload" element="tns:callback"/>
>     </wsdl:message>
>
>     <wsdl:message name="DoubleCallbackMessage">
>         <wsdl:part name="payload" element="tns:doubleCallback"/>
>     </wsdl:message>
>
>     <wsdl:message name="TripleCallbackMessage">
>         <wsdl:part name="payload" element="tns:tripleCallback"/>
>     </wsdl:message>
>
>     <wsdl:message name="ResultMessage">
>         <wsdl:part name="ack" element="tns:result"/>
>     </wsdl:message>
>
>     <wsdl:message name="InitiateMessage">
>         <wsdl:part name="payload" element="tns:initiate"/>
>     </wsdl:message>
>
>     <wsdl:message name="DoubleCallMessage">
>         <wsdl:part name="payload" element="tns:doubleCall"/>
>     </wsdl:message>
>
>     <wsdl:message name="TripleCallMessage">
>         <wsdl:part name="payload" element="wsa:EndpointReference"/>
>     </wsdl:message>
>
>     <wsdl:portType name="MSExecutePortType">
>         <wsdl:operation name="execute">
>             <wsdl:input message="tns:ExecuteMessage" name="Execute"/>
>             <wsdl:output message="tns:ResultMessage" name="Result"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:portType name="MSMainPortType">
>         <wsdl:operation name="callback">
>             <wsdl:input message="tns:CallbackMessage" name="Callback"/>
>         </wsdl:operation>
>         <wsdl:operation name="doubleCallback">
>             <wsdl:input message="tns:DoubleCallbackMessage"
> name="DoubleCallback"/>
>         </wsdl:operation>
>         <wsdl:operation name="tripleCallback">
>             <wsdl:input message="tns:TripleCallbackMessage"
> name="TripleCallback"/>
>         </wsdl:operation>
>     </wsdl:portType>
>
>     <wsdl:portType name="MSResponderPortType">
>         <wsdl:operation name="initiate">
>             <wsdl:input message="tns:InitiateMessage" name="Callback"/>
>         </wsdl:operation>
>         <wsdl:operation name="doubleCall">
>             <wsdl:input message="tns:DoubleCallMessage"
> name="DoubleCallback"/>
>         </wsdl:operation>
>         <wsdl:operation name="EndpointReference">
>             <wsdl:input message="tns:TripleCallMessage"
> name="EndpointReference"/>
>         </wsdl:operation>
>     </wsdl:portType>
> <!--
>     <wsdl:binding name="MSExecuteBinding" type="tns:MSExecutePortType">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="execute">
>             <soap:operation soapAction="" style="document"/>
>             <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="MSMainBinding" type="tns:MSMainPortType">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="callback">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>         <wsdl:operation name="doubleCallback">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>         <wsdl:operation name="tripleCallback">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:binding name="MSResponderBinding"
> type="tns:MSResponderPortType">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="initiate">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>         <wsdl:operation name="doubleCall">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>         <wsdl:operation name="EndpointReference">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input>
>                 <soap:body namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:service name="MSMainExecuteService">
>         <wsdl:port name="MSExecutePort" binding="tns:MSExecuteBinding">
>             <soap:address location="
> http://localhost:8080/ode/processes/MSMainExecuteService"/>
>         </wsdl:port>
>     </wsdl:service>
>
>     <wsdl:service name="MSMainService">
>         <wsdl:port name="MSMainPort" binding="tns:MSMainBinding">
>             <soap:address location="
> http://localhost:8080/ode/processes/MSMainService"/>
>         </wsdl:port>
>     </wsdl:service>
>
>     <wsdl:service name="MSResponderService">
>         <wsdl:port name="MSResponderPort"
> binding="tns:MSResponderBinding">
>             <soap:address location="
> http://localhost:8080/ode/processes/MSResponderService"/>
>         </wsdl:port>
>     </wsdl:service>
> -->
>
>     <plnk:partnerLinkType name="ResponderPartnerLinkType">
>         <plnk:role name="responder" portType="tns:MSResponderPortType"/>
>         <plnk:role name="main" portType="tns:MSMainPortType"/>
>     </plnk:partnerLinkType>
>
>     <plnk:partnerLinkType name="ExecutePartnerLinkType">
>         <plnk:role name="executor" portType="tns:MSExecutePortType"/>
>     </plnk:partnerLinkType>
>
> </wsdl:definitions>
>
> ------------------------------
> main.bpel--------------------------------------
> <?xml version="1.0" encoding="utf-8" ?>
> <process name="MagicSessionMain"
>          targetNamespace="http://ode/bpel/unit-test"
>          xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>          xmlns:tns="http://ode/bpel/unit-test"
>          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>          xmlns:test="http://ode/bpel/unit-test.wsdl">
>
>   <import location="Main.wsdl" namespace="http://ode/bpel/unit-test.wsdl"
>      importType="http://schemas.xmlsoap.org/wsdl/" />
>
>   <partnerLinks>
>     <partnerLink name="responderPartnerLink"
> partnerLinkType="test:ResponderPartnerLinkType"
>                  myRole="main" partnerRole="responder"
> initializePartnerRole="yes"/>
>     <partnerLink name="executePartnerLink"
> partnerLinkType="test:ExecutePartnerLinkType"
>                  myRole="executor"/>
>   </partnerLinks>
>
>   <variables>
>     <variable name="dummy" messageType="test:ExecuteMessage"/>
>     <variable name="dummy2" messageType="test:InitiateMessage"/>
>     <variable name="dummy3" messageType="test:CallbackMessage"/>
>     <variable name="dummy4" messageType="test:DoubleCallMessage"/>
>     <variable name="dummy5" messageType="test:DoubleCallbackMessage"/>
>     <variable name="eprmessage" messageType="test:TripleCallMessage"/>
>     <variable name="myepr" messageType="test:TripleCallbackMessage"/>
>     <variable name="result" messageType="test:ResultMessage"/>
>   </variables>
>
>   <sequence>
>     <!-- Start message -->
>     <receive name="start" partnerLink="executePartnerLink"
>              portType="test:MSExecutePortType" operation="execute"
> createInstance="yes" variable="dummy"/>
>
>     <!-- Initializing message, starting the responder process with the
> magic
> session
>          and expecting a callback -->
>     <assign>
>       <copy>
>         <from>123</from>
>         <to variable="dummy2" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="initiate" partnerLink="responderPartnerLink"
> portType="test:MSResponderPortType"
>             operation="initiate" inputVariable="dummy2"/>
>
>     <receive name="callback" partnerLink="responderPartnerLink"
>              portType="test:MSMainPortType" operation="callback"
> variable="dummy3"/>
>
>     <!-- Initializing message, calling our partner again with magic
> session
> (double invocation) -->
>     <assign>
>       <copy>
>         <from>123</from>
>         <to variable="dummy4" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="get-endpoint" partnerLink="responderPartnerLink"
> portType="test:MSResponderPortType"
>             operation="doubleCall" inputVariable="dummy4"/>
>
>     <receive name="doubleCallback" partnerLink="responderPartnerLink"
>              portType="test:MSMainPortType" operation="doubleCallback"
> variable="dummy5"/>
>
>     <!-- Sending our endpoint explicitly to have our partner calling us
> back
> using it
>          (demonstrating assignment) -->
>     <assign>
>       <copy>
>         <from partnerLink="responderPartnerLink"
> endpointReference="myRole"/>
>         <to variable="eprmessage" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="eprPassing" partnerLink="responderPartnerLink"
> portType="test:MSResponderPortType"
>             operation="EndpointReference" inputVariable="eprmessage"/>
>
>     <receive name="tripleCallback" partnerLink="responderPartnerLink"
>              portType="test:MSMainPortType" operation="tripleCallback"
> variable="myepr"/>
>
>     <!-- Done. -->
>     <assign>
>       <copy>
>         <from>'OK'</from>
>         <to variable="result" part="ack"/>
>       </copy>
>     </assign>
>     <reply name="end" partnerLink="executePartnerLink"
>            portType="test:MSExecutePortType" operation="execute"
> variable="result"/>
>
>   </sequence>
> </process>
>
> --------------------------------
> Responder.bpel----------------------------------
> <?xml version="1.0" encoding="utf-8" ?>
> <!--
>     example copied from
>
>
> https://svn.apache.org/viewvc/ode/trunk/distro/src/examples-war/MagicSession/
>   -->
>
> <process name="MagicSessionResponder"
>          targetNamespace="http://ode/bpel/responder"
>          xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>          xmlns:tns="http://ode/bpel/responder"
>          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>          xmlns:resp="http://ode/bpel/unit-test.wsdl">
>
>   <import location="Main.wsdl" namespace="http://ode/bpel/unit-test.wsdl"
>      importType="http://schemas.xmlsoap.org/wsdl/" />
>
>   <partnerLinks>
>     <partnerLink name="mainPartnerLink"
> partnerLinkType="resp:ResponderPartnerLinkType"
>                  myRole="responder" partnerRole="main"
> initializePartnerRole="yes"/>
>   </partnerLinks>
>
>   <variables>
>     <variable name="dummy2" messageType="resp:InitiateMessage"/>
>     <variable name="dummy3" messageType="resp:CallbackMessage"/>
>     <variable name="dummy4" messageType="resp:DoubleCallMessage"/>
>     <variable name="dummy5" messageType="resp:DoubleCallbackMessage"/>
>     <variable name="eprmessage" messageType="resp:TripleCallMessage"/>
>     <variable name="dummy6" messageType="resp:TripleCallbackMessage"/>
>   </variables>
>
>   <sequence>
>     <!-- Starting process and first callback -->
>     <receive name="start" partnerLink="mainPartnerLink" variable="dummy2"
>              portType="resp:MSResponderPortType" operation="initiate"
> createInstance="yes"/>
>     <assign>
>       <copy>
>         <from>123</from>
>         <to variable="dummy3" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="callback" partnerLink="mainPartnerLink"
>            portType="resp:MSMainPortType" operation="callback"
> inputVariable="dummy3"/>
>
>     <!-- Second callback -->
>     <receive name="doubleCall" partnerLink="mainPartnerLink"
> variable="dummy4"
>              portType="resp:MSResponderPortType" operation="doubleCall"/>
>     <assign>
>       <copy>
>         <from>123</from>
>         <to variable="dummy5" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="doubleCallback" partnerLink="mainPartnerLink"
>            portType="resp:MSMainPortType" operation="doubleCallback"
> inputVariable="dummy5"/>
>
>     <!-- Callback on the epr explicitly provided by partner in the message
>          (demonstrating assignment) -->
>     <receive name="eprPassing" partnerLink="mainPartnerLink"
> variable="eprmessage"
>              portType="resp:MSResponderPortType"
> operation="EndpointReference"/>
>     <assign>
>       <copy>
>         <from variable="eprmessage" part="payload"/>
>         <to partnerLink="mainPartnerLink"/>
>       </copy>
>       <copy>
>         <from>123</from>
>         <to variable="dummy6" part="payload"/>
>       </copy>
>     </assign>
>     <invoke name="tripleCallback" partnerLink="mainPartnerLink"
>            portType="resp:MSMainPortType" operation="tripleCallback"
> inputVariable="dummy6"/>
>
>   </sequence>
> </process>
>
>
> --
>
> Simon S.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message