<?xml version="1.0"?>
<definitions name="EdecReceiptService" 
	targetNamespace="http://www.e-dec.ch/services/EdecReceiptService/v3/" 
	xmlns:tns="http://www.e-dec.ch/services/EdecReceiptService/v3/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	xmlns:receiptRequest="http://www.e-dec.ch/xml/schema/edecReceiptRequest/v3" 
	xmlns:receiptResponse="http://www.e-dec.ch/xml/schema/edecReceiptResponse/v3" 
	xmlns="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<documentation>Service for the SYNCHRONOUS submission of e-dec receipts requests (import, export).</documentation>

	<wsp:Policy wsu:Id="DigitalSignatureWithCertificateAndTimestampPolicy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"
	            xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
		<wsp:ExactlyOne>
			<wsp:All alternative-id="DigitalSignatureWithCertificateAndTimestampPolicy">
				<sp:AsymmetricBinding>
					<wsp:Policy>
						<sp:IncludeTimestamp/>
						<sp:AlgorithmSuite>
							<wsp:Policy>
								<sp:TripleDesRsa15/>
							</wsp:Policy>
						</sp:AlgorithmSuite>
						<sp:RecipientToken>
							<wsp:Policy>
								<sp:X509Token IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
							</wsp:Policy>
						</sp:RecipientToken>
						<sp:InitiatorToken>
							<wsp:Policy>
								<sp:X509Token IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
							</wsp:Policy>
						</sp:InitiatorToken>
					</wsp:Policy>
				</sp:AsymmetricBinding>
				<sp:SignedParts>
					<sp:Body/>
				</sp:SignedParts>
			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>

	<types>
		<xsd:schema>
			<xsd:import namespace="http://www.e-dec.ch/xml/schema/edecReceiptRequest/v3" schemaLocation="http://www.ezv.admin.ch/pdf_linker.php?doc=edecReceiptRequest_v_3_0"/>
		</xsd:schema>
		<xsd:schema>
			<xsd:import namespace="http://www.e-dec.ch/xml/schema/edecReceiptResponse/v3" schemaLocation="http://www.ezv.admin.ch/pdf_linker.php?doc=edecReceiptResponse_v_3_0"/>
		</xsd:schema>
	</types>

	<message name="receiptRequestRequest">
		<documentation>Contains the parameters for a receipt request.</documentation>
		<part name="parameters" element="receiptRequest:receiptRequest"/>
	</message>

	<message name="receiptRequestResponse">
		<documentation>Contains a list of receipt numbers or a concrete receipt. The response is digitally signed according to the WS-Security standard. 
						The signature is described in a WS-Security Policy.
		</documentation>
		<part name="parameters" element="receiptResponse:receiptRequestResponse"/>
	</message>

	<message name="receiptRequestFault">
		<documentation>Contains the reason why the request failed.</documentation>
		<part name="parameters" element="receiptResponse:receiptRequestResponse"/>
	</message>

	<portType name="EdecReceiptPortType">
		<operation name="receiptRequest">
			<input message="tns:receiptRequestRequest"/>
			<output message="tns:receiptRequestResponse" wsp:PolicyURIs="#DigitalSignatureWithCertificateAndTimestampPolicy"/>
			<fault message="tns:receiptRequestFault" name="receiptRequestFault"/>
		</operation>
	</portType>

	<binding name="EdecReceiptBinding" type="tns:EdecReceiptPortType">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="receiptRequest">
			<soap:operation soapAction="receiptRequest" style="document"/>
			<input>
				<soap:body use="literal" parts="parameters"/>
			</input>
			<output>
				<soap:body use="literal" parts="parameters"/>
			</output>
			<fault name="receiptRequestFault">
				<soap:fault name="receiptRequestFault" use="literal"/>
			</fault>
		</operation>
	</binding>

	<service name="EdecReceiptService">
		<documentation>Submit a receipt request to e-dec and receive a synchronous response. 
				Note that a client certificate is required for authentication.</documentation>
		<port name="EdecReceiptPort" binding="tns:EdecReceiptBinding">
			<soap:address location="https://ws.edec-a.ezv.admin.ch/services/EdecReceiptService/v3"/>
		</port>
	</service>
</definitions>