<definitions name="producerConsumer"
  targetNamespace="http://orchestra.ow2.org/demos/producerConsumer"
  xmlns:tns="http://orchestra.ow2.org/demos/producerConsumer"
  xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">


  <plnk:partnerLinkType name="producerPLT">
    <plnk:role name="producer" portType="tns:producerPT" />
  </plnk:partnerLinkType>

  <plnk:partnerLinkType name="clientPLT">
    <plnk:role name="client" portType="tns:consumerPT" />
  </plnk:partnerLinkType>

  <types>
        <schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
                targetNamespace="http://orchestra.ow2.org/demos/producerConsumer" 
                xmlns="http://www.w3.org/2001/XMLSchema">

            <element name="request">
                <complexType>
                    <sequence>
                        <element name="input" type="string"/>
                    </sequence>
                </complexType>
            </element>

            <element name="response">
                <complexType>
                    <sequence>
                        <element name="result" type="string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
  </types>


  <message name="producerMsg">
    <part name="product" element="tns:request" />
  </message>

  <message name="consumerRequest">
    <part name="input" element="tns:request" />
  </message>

  <message name="consumerResponse">
    <part name="result" element="tns:response" />
  </message>

  <portType name="producerPT">
    <operation name="produce">
      <input message="tns:producerMsg" />
    </operation>
  </portType>

  <portType name="consumerPT">
    <operation name="request">
      <input message="tns:consumerRequest" />
      <output message="tns:consumerResponse" />
    </operation>
  </portType>

  <binding name="consumerPTSOAPBinding" type="tns:consumerPT">

  	<soap:binding style="document"
  		transport="http://schemas.xmlsoap.org/soap/http" />
  	<operation name="request">
  		<soap:operation
  			soapAction="http://orchestra.ow2.org/demos/producerConsumer/request" />
  		<input>
  			<soap:body use="literal" />
  		</input>
  		<output>
  			<soap:body use="literal" />
  		</output>
  	</operation>
  </binding>

  <binding name="producerPTSOAPBinding" type="tns:producerPT">

  	<soap:binding style="document"
  		transport="http://schemas.xmlsoap.org/soap/http" />
  	<operation name="produce">
  		<soap:operation
  			soapAction="http://orchestra.ow2.org/demos/producerConsumer/produce" />
  		<input>
  			<soap:body use="literal" />
  		</input>
  	</operation>
  </binding>

	<service name="consumerService">
		<port name="consumerPort" binding="tns:consumerPTSOAPBinding"><soap:address location="http://localhost:${HttpDefaultPort}/orchestra/consumerPort"/></port>
	</service>

	<service name="producerService">
		<port name="producerPort" binding="tns:producerPTSOAPBinding"><soap:address location="http://localhost:${HttpDefaultPort}/orchestra/producerPort"/></port>
	</service>
</definitions>
