<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://jbpm.org/examples/account"
	xmlns:tns="http://jbpm.org/examples/account" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">

	<types>
		<schema targetNamespace="http://jbpm.org/examples/account"
			xmlns="http://www.w3.org/2001/XMLSchema">
			<complexType name="AccountOperation">
				<annotation>
					<documentation>account data transfer type</documentation>
				</annotation>

				<sequence>
					<element name="customerName" type="xsd:string" />
					<element name="amount" type="xsd:double" />
				</sequence>
			</complexType>
		</schema>
	</types>

	<message name="customerMessage">
		<documentation>customer name wrapper</documentation>
		<part name="customerName" type="xsd:string" />
	</message>

	<message name="accessMessage">
		<documentation>access check response</documentation>
		<part name="granted" type="xsd:boolean" />
	</message>

	<message name="balanceMessage">
		<documentation>account balance wrapper</documentation>
		<part name="balance" type="xsd:double" />
	</message>

	<message name="accountOperation">
		<documentation>account operation request</documentation>
		<part name="body" type="tns:AccountOperation" />
	</message>

	<portType name="AccountSystem">
		<documentation>published account functions</documentation>

		<operation name="checkAccess">
			<documentation>
				tell whether a customer has an active account
			</documentation>
			<input message="tns:customerMessage" />
			<output message="tns:accessMessage" />
		</operation>

		<operation name="queryBalance">
			<documentation>retrieve the balance of an account</documentation>
			<input message="tns:customerMessage" />
			<output message="tns:balanceMessage" />
		</operation>

		<operation name="updateBalance">
			<documentation>
				increase/decrease the balance of an account
			</documentation>
			<input message="tns:accountOperation" />
			<output message="tns:balanceMessage" />
		</operation>
	</portType>

	<binding name="AccountSystemBinding" type="tns:AccountSystem">
		<soap:binding style="rpc"
			transport="http://schemas.xmlsoap.org/soap/http" />

		<operation name="checkAccess">
			<soap:operation soapAction="http://jbpm.org/examples/account#verifyAccess" />
			<input>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</input>
			<output>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</output>
		</operation>

		<operation name="queryBalance">
			<soap:operation soapAction="http://jbpm.org/examples/account#queryBalance" />
			<input>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</input>
			<output>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</output>
		</operation>

		<operation name="updateBalance">
			<soap:operation soapAction="http://jbpm.org/examples/account#updateBalance" />
			<input>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</input>
			<output>
				<soap:body use="literal" namespace="http://jbpm.org/examples/account" />
			</output>
		</operation>
	</binding>

	<service name="AccountService">
		<port name="AccountSystemPort" binding="tns:AccountSystemBinding">
			<soap:address location="http://127.0.0.1:8080/Tutorial_bpel_atm/accountSystem" />
		</port>
	</service>

</definitions>