Dago_O

CompraOnline-restfull.bpel

Nov 12th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.54 KB | None | 0 0
  1. <!-- CompraOnline-restfull BPEL Process [Generated by the Eclipse BPEL Designer] -->
  2. <!-- Date: Thu Oct 18 09:36:13 CLST 2012 -->
  3. <bpel:process name="CompraOnline-restfull"
  4.         targetNamespace="bpel.rest.compraonline"
  5.         suppressJoinFailure="yes"
  6.         xmlns:tns="bpel.rest.compraonline"
  7.         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  8.         xmlns:ns="http://cliente.tiendaonline.restws">
  9.  
  10.     <!-- Import the client WSDL -->
  11.     <bpel:import location="CompraOnline-restfullArtifacts.wsdl" namespace="bpel.rest.compraonline"
  12.             importType="http://schemas.xmlsoap.org/wsdl/" />
  13.          
  14.     <!-- ================================================================= -->        
  15.     <!-- PARTNERLINKS                                                      -->
  16.     <!-- List of services participating in this BPEL process               -->
  17.     <!-- ================================================================= -->        
  18.     <bpel:partnerLinks>
  19.         <!-- The 'client' role represents the requester of this service. -->
  20.         <bpel:partnerLink name="client"
  21.                     partnerLinkType="tns:CompraOnline-restfull"
  22.                     myRole="CompraOnline-restfullProvider"
  23.                     />
  24.        
  25.        
  26.        
  27.        
  28.        
  29.        
  30.        
  31.        
  32.         <bpel:partnerLink name="RWS_ClientePL" partnerLinkType="tns:RWS_ClientePLT" partnerRole="RWS_ClientePLRole"></bpel:partnerLink>
  33.     </bpel:partnerLinks>
  34.  
  35.     <!-- ================================================================= -->        
  36.     <!-- VARIABLES                                                         -->
  37.     <!-- List of messages and XML documents used within this BPEL process  -->
  38.     <!-- ================================================================= -->        
  39.     <bpel:variables>
  40.         <!-- Reference to the message passed as input during initiation -->
  41.         <bpel:variable name="input"
  42.                  messageType="tns:CompraOnline-restfullRequestMessage"/>
  43.                  
  44.         <!--
  45.          Reference to the message that will be returned to the requester
  46.          -->
  47.         <bpel:variable name="output"
  48.                  messageType="tns:CompraOnline-restfullResponseMessage"/>
  49.        
  50.        
  51.        
  52.        
  53.        
  54.        
  55.        
  56.        
  57.        
  58.        
  59.        
  60.        
  61.        
  62.        
  63.        
  64.        
  65.         <bpel:variable name="RWS_ClientePLResponse" messageType="ns:clienteResponse"></bpel:variable>
  66.         <bpel:variable name="RWS_ClientePLRequest" messageType="ns:clienteInput"></bpel:variable>
  67.     </bpel:variables>
  68.  
  69.     <!-- ================================================================= -->        
  70.     <!-- ORCHESTRATION LOGIC                                               -->
  71.     <!-- Set of activities coordinating the flow of messages across the    -->
  72.     <!-- services integrated within this business process                  -->
  73.     <!-- ================================================================= -->        
  74.     <bpel:sequence name="main">
  75.        
  76.         <!-- Receive input from requester.
  77.             Note: This maps to operation defined in CompraOnline-restfull.wsdl
  78.             -->
  79.         <bpel:receive name="receiveInput" partnerLink="client"
  80.                 portType="tns:CompraOnline-restfull"
  81.                 operation="process" variable="input"
  82.                 createInstance="yes"/>
  83.        
  84.         <!-- Generate reply to synchronous request -->
  85.         <bpel:assign validate="no" name="Assign_cID-RWS">
  86.            
  87.            
  88.            
  89.            
  90.            
  91.            
  92.            
  93.            
  94.            
  95.            
  96.            
  97.            
  98.            
  99.            
  100.             <bpel:copy>
  101.                 <bpel:from>
  102.                     <bpel:literal>
  103.                         <tns:cid xmlns:tns="http://cliente.tiendaonline.restws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  104.                             tns:cid
  105.                         </tns:cid>
  106.                     </bpel:literal>
  107.                 </bpel:from>
  108.                 <bpel:to variable="RWS_ClientePLRequest" part="cid"></bpel:to>
  109.             </bpel:copy>
  110.             <bpel:copy>
  111.                 <bpel:from part="payload" variable="input">
  112.                     <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
  113.                 </bpel:from>
  114.                 <bpel:to part="cid" variable="RWS_ClientePLRequest"></bpel:to>
  115.             </bpel:copy>
  116.         </bpel:assign>
  117.        
  118.        
  119.        
  120.        
  121.        
  122.        
  123.        
  124.        
  125.         <bpel:invoke name="Invoke" partnerLink="RWS_ClientePL" operation="doGET" portType="ns:RWSCliente_portType" inputVariable="RWS_ClientePLRequest" outputVariable="RWS_ClientePLResponse"></bpel:invoke>
  126.         <bpel:assign validate="no" name="Assign_RWS-Output">
  127.            
  128.            
  129.            
  130.            
  131.            
  132.            
  133.            
  134.            
  135.            
  136.            
  137.            
  138.            
  139.            
  140.            
  141.            
  142.            
  143.            
  144.            
  145.            
  146.            
  147.            
  148.            
  149.            
  150.            
  151.            
  152.             <bpel:copy>
  153.                 <bpel:from>
  154.                     <bpel:literal>
  155.                         <tns:CompraOnline-restfullResponse xmlns:tns="bpel.rest.compraonline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:result>0.0</tns:result>
  156.  
  157.                         </tns:CompraOnline-restfullResponse>
  158.                     </bpel:literal>
  159.                 </bpel:from>
  160.                 <bpel:to variable="output" part="payload"></bpel:to>
  161.             </bpel:copy>
  162.             <bpel:copy>
  163.                 <bpel:from part="CLIENTE" variable="RWS_ClientePLResponse">
  164.                     <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[descuento]]></bpel:query>
  165.                 </bpel:from>
  166.                 <bpel:to part="payload" variable="output">
  167.                     <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
  168.                 </bpel:to>
  169.             </bpel:copy>
  170.         </bpel:assign>
  171.        
  172.         <bpel:reply name="replyOutput"
  173.               partnerLink="client"
  174.               portType="tns:CompraOnline-restfull"
  175.               operation="process"
  176.               variable="output"
  177.               />
  178.     </bpel:sequence>
  179. </bpel:process>
Add Comment
Please, Sign In to add comment