Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- BPEL_Rest BPEL Process [Generated by the Eclipse BPEL Designer] -->
- <!-- Date: Tue Jul 12 12:03:16 CEST 2011 -->
- <bpel:process name="BPEL_Rest"
- targetNamespace="http://rest.bpel.tps"
- suppressJoinFailure="yes"
- xmlns:tns="http://rest.bpel.tps"
- xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- xmlns:dummy="http://ode/bpel/test/blog"
- >
- <!-- Import the client WSDL -->
- <bpel:import location="BPEL_RestArtifacts.wsdl" namespace="http://rest.bpel.tps"
- importType="http://schemas.xmlsoap.org/wsdl/" />
- <bpel:import location="RestAsWS.wsdl" namespace="http://ode/bpel/test/blog"
- importType="http://schemas.xmlsoap.org/wsdl/" />
- <!-- ================================================================= -->
- <!-- PARTNERLINKS -->
- <!-- List of services participating in this BPEL process -->
- <!-- ================================================================= -->
- <bpel:partnerLinks>
- <!-- The 'client' role represents the requester of this service. -->
- <bpel:partnerLink name="client"
- partnerLinkType="tns:BPEL_Rest"
- myRole="BPEL_RestProvider"
- />
- <bpel:partnerLink name="RestPL" partnerLinkType="tns:RestPLT" partnerRole="RestPLRole"></bpel:partnerLink>
- </bpel:partnerLinks>
- <!-- ================================================================= -->
- <!-- VARIABLES -->
- <!-- List of messages and XML documents used within this BPEL process -->
- <!-- ================================================================= -->
- <bpel:variables>
- <!-- Reference to the message passed as input during initiation -->
- <bpel:variable name="input"
- messageType="tns:BPEL_RestRequestMessage"/>
- <!--
- Reference to the message that will be returned to the requester
- -->
- <bpel:variable name="output"
- messageType="tns:BPEL_RestResponseMessage"/>
- <bpel:variable name="idMsg" messageType="dummy:IdMessage"/>
- <bpel:variable name="RestPLResponse" messageType="dummy:ArticleMessage"></bpel:variable>
- </bpel:variables>
- <!-- ================================================================= -->
- <!-- ORCHESTRATION LOGIC -->
- <!-- Set of activities coordinating the flow of messages across the -->
- <!-- services integrated within this business process -->
- <!-- ================================================================= -->
- <bpel:sequence name="main">
- <!-- Receive input from requester.
- Note: This maps to operation defined in BPEL_Rest.wsdl
- -->
- <bpel:receive name="receiveInput" partnerLink="client"
- portType="tns:BPEL_Rest"
- operation="process" variable="input"
- createInstance="yes"/>
- <bpel:assign validate="no" name="Assign_CustomerID">
- <bpel:copy>
- <bpel:from>
- <bpel:literal xml:space="preserve">18</bpel:literal>
- </bpel:from>
- <bpel:to part="customerId" variable="idMsg"></bpel:to>
- </bpel:copy>
- </bpel:assign>
- <bpel:invoke name="Invoke" partnerLink="RestPL" operation="doGET" portType="dummy:BlogPortType" inputVariable="idMsg" outputVariable="RestPLResponse"></bpel:invoke>
- <!-- Generate reply to synchronous request -->
- <bpel:assign validate="no" name="Assign_Output">
- <bpel:copy>
- <bpel:from>
- <bpel:literal>
- <tns:BPEL_RestResponse xmlns:tns="http://rest.bpel.tps" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:result>tns:result</tns:result>
- </tns:BPEL_RestResponse>
- </bpel:literal>
- </bpel:from>
- <bpel:to variable="output" part="payload"></bpel:to>
- </bpel:copy>
- <bpel:copy>
- <bpel:from part="CUSTOMER" variable="RestPLResponse">
- <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[FIRSTNAME]]></bpel:query>
- </bpel:from>
- <bpel:to part="payload" variable="output">
- <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
- </bpel:to>
- </bpel:copy>
- </bpel:assign>
- <bpel:reply name="replyOutput"
- partnerLink="client"
- portType="tns:BPEL_Rest"
- operation="process"
- variable="output"
- />
- </bpel:sequence>
- </bpel:process>
Advertisement
Add Comment
Please, Sign In to add comment