1. <?xml version="1.0"?>
  2. <definitions name="onEventProcess"
  3.        targetNamespace="http://example.org/onEventProcess/wsdl"
  4.        xmlns:tns="http://example.org/onEventProcess/wsdl"
  5.        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  6.        xmlns="http://schemas.xmlsoap.org/wsdl/"
  7.        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  8.        >
  9.  
  10. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11.     TYPE DEFINITION - List of services participating in this BPEL process
  12.     The default output of the BPEL designer uses strings as input and
  13.     output to the BPEL Process. But you can define or import any XML
  14.     Schema type and us them as part of the message types.
  15.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
  16.     <types>  
  17.         <schema attributeFormDefault="unqualified"
  18.                elementFormDefault="qualified"
  19.                targetNamespace="http:"
  20.                xmlns="http://www.w3.org/2001/XMLSchema"
  21.                >
  22.                
  23.             <element name="onEventProcessRequest">
  24.                 <complexType>
  25.                     <sequence>
  26.                         <element name="input" type="string" />
  27.                     </sequence>
  28.                 </complexType>
  29.             </element>
  30.                  
  31.             <element name="onEventProcessResponse">
  32.                 <complexType>
  33.                     <sequence>
  34.                         <element name="result" type="string"/>
  35.                     </sequence>
  36.                 </complexType>
  37.             </element>
  38.            
  39.         </schema>
  40.     </types>
  41.  
  42. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43.     MESSAGE TYPE DEFINITION - Definition of the message types used as
  44.     part of the port type defintions
  45.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
  46.     <message name="onEventProcessRequestMessage">
  47.         <part name="payload" element="tns:onEventProcessRequest"/>
  48.     </message>
  49.    
  50.     <message name="onEventProcessResponseMessage">
  51.         <part name="payload" element="tns:onEventProcessResponse"/>
  52.     </message>
  53.  
  54.  
  55. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56.     PORT TYPE DEFINITION - A port type groups a set of operations into
  57.     a logical service unit.
  58.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  59.     <!-- portType implemented by the onEventProcess BPEL process -->
  60.     <portType name="onEventProcess">
  61.         <operation name="initiate">
  62.             <input message="tns:onEventProcessRequestMessage"/>
  63.         </operation>
  64.     </portType>
  65.  
  66.     <!-- portType implemented by the requester of onEventProcess BPEL process
  67.         for asynchronous callback purposes
  68.         -->
  69.     <portType name="onEventProcessCallback">
  70.         <operation name="onResult">
  71.             <input message="tns:onEventProcessResponseMessage"/>
  72.         </operation>
  73.     </portType>
  74.  
  75.  
  76. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  77.     PARTNER LINK TYPE DEFINITION
  78.         the onEventProcess partnerLinkType binds the provider and
  79.         requester portType into an asynchronous conversation.
  80.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
  81.     <plnk:partnerLinkType name="onEventProcess">
  82.         <plnk:role name="onEventProcessProvider" portType="tns:onEventProcess"/>
  83.         <plnk:role name="onEventProcessRequester" portType="tns:onEventProcessCallback"/>
  84.     </plnk:partnerLinkType>  
  85.  
  86. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  87.     BINDING DEFINITION - Defines the message format and protocol details
  88.     for a web service.
  89.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  90.     <binding name="onEventProcessBinding" type="tns:onEventProcess">
  91.         <soap:binding style="document"
  92.             transport="http://schemas.xmlsoap.org/soap/http"/>
  93.         <operation name="initiate">
  94.             <soap:operation
  95.                 soapAction="http:/initiate"/>
  96.             <input>
  97.                 <soap:body use="literal"/>
  98.             </input>
  99.         </operation>
  100.     </binding>
  101.  
  102.     <binding name="onEventProcessCallbackBinding" type="tns:onEventProcessCallback">
  103.         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  104.         <operation name="onResult">
  105.             <soap:operation
  106.                 soapAction="http:/onResult"/>
  107.             <input>
  108.                 <soap:body use="literal"/>
  109.             </input>
  110.         </operation>
  111.     </binding>
  112.  
  113. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  114.     SERVICE DEFINITION - A service groups a set of port into
  115.     a service unit.
  116.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  117.     <service name="onEventProcess">
  118.         <port name="onEventProcessPort" binding="tns:onEventProcessBinding">
  119.             <soap:address location="http://localhost:8080/onEventProcess"/>
  120.         </port>
  121.     </service>
  122.  
  123.     <service name="onEventProcessCallback">
  124.         <port name="onEventProcessPortCallbackPort" binding="tns:onEventProcessCallbackBinding">
  125.             <soap:address location="http://localhost:8080/onEventProcessCallback"/>
  126.         </port>
  127.     </service>
  128. </definitions>