<?xml version="1.0" encoding="UTF-8"?>
<!-- ********************************************************************************** -->
<!-- IBM SVN information                                                    			-->
<!-- Version:         $Revision: 7085 $													-->
<!-- LastChangedDate: $LastChangedDate: 2017-08-23 16:53:46 +0200 (Mi, 23 Aug 2017) $  	-->
<!-- LastChangedBy:   $LastChangedBy: r.petermann@de.ibm.com $						   	-->
<!-- ********************************************************************************** -->
<xsd:schema targetNamespace="http://paymentorder.justice.eu/Payload/V3_0"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:payload="http://paymentorder.justice.eu/Payload/V3_0"
	xmlns:po="http://paymentorder.justice.eu"
	elementFormDefault="unqualified" 
	attributeFormDefault="unqualified"
	version="3.3">

	<xsd:include schemaLocation="Formsheets.xsd" />
	<xsd:include schemaLocation="CatalogTypes.xsd" />
	
	<xsd:element name="IncomingPayload" type="payload:IncomingPayloadType" abstract="true" />
	<xsd:element name="NewFormA" type="payload:NewFormAType" substitutionGroup="payload:IncomingPayload" />
	<xsd:element name="UpdateFormA" type="payload:UpdateFormAType" substitutionGroup="payload:IncomingPayload" />
	<xsd:element name="CompletionFormA" type="payload:CompletionFormAType" substitutionGroup="payload:IncomingPayload" />
	<xsd:element name="AcceptanceOfProposal" type="payload:AcceptanceOfProposalPayloadType" substitutionGroup="payload:IncomingPayload" /> <!-- changed in 3.0 -->
	<xsd:element name="EntryOfAppendix2" type="payload:EntryOfAppendix2Type" substitutionGroup="payload:IncomingPayload" />
	<xsd:element name="ResultOfService" type="payload:ResultOfServiceType" substitutionGroup="payload:IncomingPayload" /> <!--  since 2.1 -->
	<xsd:element name="IncomingLetter" type="payload:IncomingLetterType" substitutionGroup="payload:IncomingPayload" /> <!--  new in 3.0-->
	<xsd:element name="OppositionToPaymentOrder" type="payload:OppositionToPaymentOrderType" substitutionGroup="payload:IncomingPayload" /> <!--  new in 3.0-->

	<xsd:element name="OutgoingPayload" type="payload:OutgoingPayloadType" abstract="true" />	
	<xsd:element name="ResponsePayload" type="payload:ResponsePayloadType" substitutionGroup="payload:OutgoingPayload" />
	<xsd:element name="OutgoingFormBPayload" type="payload:OutgoingFormBPayloadType" substitutionGroup="payload:OutgoingPayload" /> <!--  since 2.1 -->
	<xsd:element name="OutgoingFormCPayload" type="payload:OutgoingFormCPayloadType" substitutionGroup="payload:OutgoingPayload" /> <!--  since 2.1 -->
	<xsd:element name="OutgoingFormDPayload" type="payload:OutgoingFormDPayloadType" substitutionGroup="payload:OutgoingPayload" /> <!--  since 2.1 -->
	<xsd:element name="OutgoingFormGPayload" type="payload:OutgoingFormGPayloadType" substitutionGroup="payload:OutgoingPayload" /> <!--  since 2.1 -->
	<xsd:element name="OutgoingLetterPayload" type="payload:OutgoingLetterPayloadType" substitutionGroup="payload:OutgoingPayload" /> <!--  since 2.1 -->
	
	<!-- new in 3.0 -->
	<xsd:complexType name="PayloadType" abstract="true">
		<xsd:sequence>
			<xsd:element minOccurs="0" name="AttachmentCount" type="xsd:decimal"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="IncomingPayloadType" abstract="true">
		<xsd:complexContent>
			<xsd:extension base="payload:PayloadType"> <!-- since 3.0 -->
				<xsd:sequence>
					<xsd:element minOccurs="0" name="Court" type="payload:CourtType"/> <!--  since 1.0.2 -->
					<xsd:element minOccurs="0" maxOccurs="1" name="OriginatorMessageId" type="payload:String_48_Value" />
					<xsd:element minOccurs="1" maxOccurs="1" name="ResponsePDF" type="payload:BooleanValue" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="NewFormAType">	<!-- Initiales FBl. A ist eingegangen -->
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element minOccurs="0" name="CourtId" type="payload:String_128_Value" /> <!-- minOccurs=0 since 1.0.2 -->
					<xsd:element ref="payload:Formsheet_A" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="UpdateFormAType">	<!-- Aktualisierung Fbl. A -->
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element ref="payload:Formsheet_A" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="CompletionFormAType"> <!-- Antwort auf Form B -->
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element ref="payload:Formsheet_A" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- changed in 3.0 -->
	<xsd:complexType name="AcceptanceOfProposalPayloadType"> <!-- Antwort auf Form C -->
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element name="AcceptanceOfProposal" type="payload:AcceptanceOfProposalType" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="EntryOfAppendix2Type"> <!-- Anlage 2 ist eingegangen -->
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element name="Confirmation" type="payload:RejectionOfTransferType" /> <!-- changed in 3.3 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<!-- new in 3.0 -->
	<xsd:complexType name="IncomingLetterType"> <!-- Brief ist eingegangen --> 
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element name="Letter" type="payload:LetterType"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<!-- new in 3.0 -->
	<xsd:complexType name="OppositionToPaymentOrderType"> <!-- Formblatt F ist eingegangen --> 
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element name="Formsheet_F" type="payload:Formsheet_F_Type"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="OutgoingPayloadType" abstract="true">
		<xsd:complexContent>
			<xsd:extension base="payload:PayloadType" /> <!-- since 3.0 -->
		</xsd:complexContent>
	</xsd:complexType>
	
	<!--  since 2.0 -->
	<xsd:complexType name="OutgoingBusinessPayloadType" abstract="true" >
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingPayloadType">
				<xsd:sequence>				
					<xsd:element name="ReferenceNumber" type="payload:String_128_Value"/>
					<xsd:element name="Court" type="payload:CourtType"/> <!--  since 2.2.0 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<!-- since 2.1 -->
	<xsd:complexType name="OutgoingFormBPayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingBusinessPayloadType">
				<xsd:sequence>				
					<xsd:element name="Receiver" type="payload:ReferenceType"/>
					<xsd:element name="Formsheet_B" type="payload:Formsheet_B_Type"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>	
	</xsd:complexType>

	<!-- since 2.1 -->
	<xsd:complexType name="OutgoingFormCPayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingBusinessPayloadType">
				<xsd:sequence>				
					<xsd:element name="Receiver" type="payload:ReferenceType"/>
					<xsd:element name="Formsheet_C" type="payload:Formsheet_C_Type"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>	
	</xsd:complexType>

	<!-- since 2.1 -->
	<xsd:complexType name="OutgoingFormDPayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingBusinessPayloadType">
				<xsd:sequence>				
					<xsd:element name="Receiver" type="payload:ReferenceType"/>
					<xsd:element name="Formsheet_D" type="payload:Formsheet_D_Type"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>	
	</xsd:complexType>

	<!-- since 2.1 -->
	<xsd:complexType name="OutgoingFormGPayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingBusinessPayloadType">
				<xsd:sequence>				
					<xsd:element name="Receiver" type="payload:ReferenceType"/>
					<xsd:element name="Formsheet_G" type="payload:Formsheet_G_Type"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>	
	</xsd:complexType>

	<!-- since 2.1 -->
	<xsd:complexType name="OutgoingLetterPayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingBusinessPayloadType">
				<xsd:sequence>				
					<xsd:element name="Receiver" type="payload:ReferenceType"/> <!-- changed in 2.2.0 -->
					<xsd:element name="Letter" type="payload:LetterType"/>
					<xsd:element name="Confirmation" type="payload:OutgoingConfirmationType" /> <!-- since 3.0 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>	
	</xsd:complexType>

	<xsd:complexType name="ResponsePayloadType">
		<xsd:complexContent>
			<xsd:extension base="payload:OutgoingPayloadType">
				<xsd:sequence>
					<xsd:element minOccurs="0" name="IncomingPayloadType" type="payload:IncomingForm" /><!-- minOccurs=0 since 1.0.1 -->
					<xsd:element minOccurs="0" name="RefOriginatorMessageId" type="payload:String_128_Value" /><!--minOccurs=0 since 1.0.1 -->
					<xsd:element name="Status" type="payload:OutgoingPayloadStatus" />
					<xsd:element minOccurs="0" name="ConfirmedTimeOfReceipt" type="payload:DateTimeValue" /><!--minOccurs=0 since 1.0.1 -->
					<xsd:element minOccurs="0" name="ReferenceNumber" type="payload:ReferenceNumberValue" />
					<xsd:element maxOccurs="unbounded" name="ValidationResult" type="payload:ValidationResultType" /><!-- at least one element since 1.0.1 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<xsd:complexType name="ValidationResultType">
		<xsd:sequence>
			<xsd:element name="Severity" type="payload:ResultSeverity" />
			<xsd:element name="Id" type="payload:String_128_Value" />
			<xsd:element name="Message" type="payload:String_256_Value" />
		</xsd:sequence>
	</xsd:complexType>

	<!-- since 2.1 -->
	<xsd:complexType name="ResultOfServiceType">
		<xsd:complexContent>
			<xsd:extension base="payload:IncomingPayloadType">
				<xsd:sequence>
					<xsd:element name="Result" type="payload:ResultSeverity"/> <!-- type changed in 2.1 -->
					<xsd:element name="ResultDetails" minOccurs="0" type="payload:String_256_Value"/> 
					<xsd:element name="DateOfService" type="payload:DateValue"/>
					<xsd:element name="RefMessageId" type="payload:String_256_Value"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
</xsd:schema>
