<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://manufacturing.org/wsdl/purchase"
	xmlns:pos="http://manufacturing.org/wsdl/purchase" xmlns:sns="http://manufacturing.org/xsd/purchase"
	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

	<types>
		<xsd:schema>
			<xsd:import namespace="http://manufacturing.org/xsd/purchase"
				schemaLocation="purchase.xsd" />
		</xsd:schema>
	</types>

	<message name="POMessage">
		<part name="customerInfo" type="sns:customerInfo" />
		<part name="purchaseOrder" type="sns:purchaseOrder" />
	</message>

	<message name="InvMessage">
		<part name="IVC" type="sns:Invoice" />
	</message>

	<message name="orderFaultType">
		<part name="problemInfo" element="sns:problemInfo" />
	</message>

	<message name="shippingRequestMessage">
		<part name="customerInfo" type="sns:customerInfo" />
	</message>

	<message name="shippingInfoMessage">
		<part name="shippingInfo" type="sns:shippingInfo" />
	</message>

	<message name="scheduleMessage">
		<part name="schedule" type="sns:scheduleInfo" />
	</message>

	<!-- portTypes supported by the purchase order process -->

	<portType name="purchaseOrderPT">
		<operation name="sendPurchaseOrder">
			<input message="pos:POMessage" />
			<output message="pos:InvMessage" />
			<fault name="cannotCompleteOrder" message="pos:orderFaultType" />
		</operation>
	</portType>

	<portType name="invoiceCallbackPT">
		<operation name="sendInvoice">
			<input message="pos:InvMessage" />
		</operation>
	</portType>

	<portType name="shippingCallbackPT">
		<operation name="sendSchedule">
			<input message="pos:scheduleMessage" />
		</operation>
	</portType>

	<!-- portType supported by the invoice services -->

	<portType name="computePricePT">
		<operation name="initiatePriceCalculation">
			<input message="pos:POMessage" />
		</operation>
		<operation name="sendShippingPrice">
			<input message="pos:shippingInfoMessage" />
		</operation>
	</portType>

	<!-- portType supported by the shipping service -->

	<portType name="shippingPT">
		<operation name="requestShipping">
			<input message="pos:shippingRequestMessage" />
			<output message="pos:shippingInfoMessage" />
			<fault name="cannotCompleteOrder" message="pos:orderFaultType" />
		</operation>
	</portType>

	<!-- portType supported by the production scheduling process -->

	<portType name="schedulingPT">
		<operation name="requestProductionScheduling">
			<input message="pos:POMessage" />
		</operation>
		<operation name="sendShippingSchedule">
			<input message="pos:scheduleMessage" />
		</operation>
	</portType>

	<plnk:partnerLinkType name="purchasingLT">
		<plnk:role name="purchaseService" portType="pos:purchaseOrderPT" />
	</plnk:partnerLinkType>

	<plnk:partnerLinkType name="invoicingLT">
		<plnk:role name="invoiceService" portType="pos:computePricePT" />
		<plnk:role name="invoiceRequester" portType="pos:invoiceCallbackPT" />
	</plnk:partnerLinkType>

	<plnk:partnerLinkType name="shippingLT">
		<plnk:role name="shippingService" portType="pos:shippingPT" />
		<plnk:role name="shippingRequester" portType="pos:shippingCallbackPT" />
	</plnk:partnerLinkType>

	<plnk:partnerLinkType name="schedulingLT">
		<plnk:role name="schedulingService" portType="pos:schedulingPT" />
	</plnk:partnerLinkType>

	<binding name="purchaseOrderSB" type="pos:purchaseOrderPT">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="sendPurchaseOrder">
			<soap:operation soapAction="http://manufacturing.org/wsdl/purchase/sendPurchaseOrder" />
			<input>
				<soap:body use="literal" namespace="http://manufacturing.org/wsdl/purchase" />
			</input>
			<output>
				<soap:body use="literal" namespace="http://manufacturing.org/wsdl/purchase" />
			</output>
			<fault name="cannotCompleteOrder">
				<soap:fault use="literal" name="cannotCompleteOrder" />
			</fault>
		</operation>
	</binding>

	<binding name="invoiceCallbackSB" type="pos:invoiceCallbackPT">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="sendInvoice">
			<soap:operation soapAction="http://manufacturing.org/wsdl/purchase/sendInvoice" />
			<input>
				<soap:body use="literal" namespace="http://manufacturing.org/wsdl/purchase" />
			</input>
		</operation>
	</binding>

	<binding name="shippingCallbackSB" type="pos:shippingCallbackPT">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="sendSchedule">
			<soap:operation soapAction="http://manufacturing.org/wsdl/purchase/sendSchedule" />
			<input>
				<soap:body use="literal" namespace="http://manufacturing.org/wsdl/purchase" />
			</input>
		</operation>
	</binding>

	<service name="purchaseSVC">
		<port name="purchaseOrderSP" binding="pos:purchaseOrderSB">
			<soap:address location="http://127.0.0.1:8080/Tutorial_bpel_purchase_purchaseOrder" />
		</port>
		<port name="invoiceCallbackSP" binding="pos:invoiceCallbackSB">
			<soap:address
				location="http://127.0.0.1:8080/Tutorial_bpel_purchase_invoiceCallback" />
		</port>
		<port name="shippingCallbackSP" binding="pos:shippingCallbackSB">
			<soap:address
				location="http://127.0.0.1:8080/Tutorial_bpel_purchase_shippingCallback" />
		</port>
	</service>
</definitions>