<?xml version="1.0"?>
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Arne Tauber (Technische Universität Graz) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns="http://reference.e-government.gv.at/namespace/moazs10/app2mzs#" targetNamespace="http://reference.e-government.gv.at/namespace/moazs10/app2mzs#" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="mzs_mypersondata_en.xsd"/>
	<!--### Webservice Nachrichten: Request-Response ###-->
	<!--### Zustellstückanlieferung, synchronous communication ###-->
	<xs:element name="DeliveryRequest" type="DeliveryRequestType"/>
	<xs:complexType name="DeliveryRequestType">
		<xs:sequence>
			<xs:element name="Server" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Falls angegeben, wird keine Zustellkopfabfrage durchgeführt.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="ZUSEUrlID" type="xs:anyURI"/>
						<xs:element name="X509" type="xs:base64Binary" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Sender">
				<xs:annotation>
					<xs:documentation>Alle weiteren Daten sind im Konfigurationsprofil gespeichert</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:choice>
							<xs:element name="ProfileID" type="xs:string"/>
							<xs:sequence>
								<xs:element ref="p:Person"/>
								<xs:element ref="p:Address" minOccurs="0" maxOccurs="unbounded"/>
								<xs:choice>
									<xs:element name="WebserviceURL" type="xs:anyURI"/>
									<xs:element name="EMailAddress" type="xs:string"/>
								</xs:choice>
							</xs:sequence>
						</xs:choice>
						<xs:sequence>
							<xs:element name="SignatureKeyID" type="xs:string" minOccurs="0">
								<xs:annotation>
									<xs:documentation>fuer Signatur mit MOA-SS</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element ref="Receiver"/>
			<xs:element name="MetaData">
				<xs:complexType>
					<xs:sequence>
						<xs:element ref="AppDeliveryID"/>
						<xs:element name="DeliveryQuality">
							<xs:annotation>
								<xs:documentation>RSa oder non-RSa</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="RSa"/>
									<xs:enumeration value="RSa+"/>
									<xs:enumeration value="nonRSa"/>
									<xs:enumeration value="nonRSa+"/>
									<xs:enumeration value="R"/>
									<xs:enumeration value="R+"/>
									<xs:enumeration value="RS"/>
									<xs:enumeration value="RS+"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="RequiresEncryption" type="xs:boolean"/>
						<xs:element name="PrivateDelivery" type="xs:boolean" minOccurs="0"/>
						<xs:element name="DocumentClass" minOccurs="0">
							<xs:simpleType>
								<xs:restriction base="xs:token">
									<xs:maxLength value="255"/>
									<xs:minLength value="1"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="DualDelivery" minOccurs="0">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="DualDeliveryServer" type="xs:string" minOccurs="0"/>
									<xs:element name="PrintParameter" minOccurs="0">
										<xs:complexType>
											<xs:sequence>
												<xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
											</xs:sequence>
											<xs:attribute name="profile" type="xs:anyURI" use="optional"/>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="MailBody" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Optional mail body</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="MimeType" type="xs:token"/>
									<xs:element name="Content" type="xs:base64Binary"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="XMLDocument" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="XMLContent">
							<xs:complexType>
								<xs:sequence>
									<xs:any namespace="##any" processContents="lax"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:choice>
							<xs:element name="XMLProfileID"/>
							<xs:sequence>
								<xs:element name="FileName" type="xs:token"/>
								<xs:element name="MIMEType" type="xs:token"/>
								<xs:element name="ResultingMIMEType" type="xs:token"/>
								<xs:element name="SignatureXPath">
									<xs:complexType>
										<xs:simpleContent>
											<xs:extension base="xs:string">
												<xs:attribute name="Index" type="xs:integer" use="required"/>
											</xs:extension>
										</xs:simpleContent>
									</xs:complexType>
								</xs:element>
								<xs:element name="SignatureStylesheet">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="XMLContent">
												<xs:complexType>
													<xs:sequence>
														<xs:any namespace="##any" processContents="lax"/>
													</xs:sequence>
												</xs:complexType>
											</xs:element>
										</xs:sequence>
									</xs:complexType>
								</xs:element>
								<xs:element name="PreviewStylesheet" minOccurs="0">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="FileName" type="xs:token"/>
											<xs:element name="XMLContent">
												<xs:complexType>
													<xs:sequence>
														<xs:any namespace="##any" processContents="lax"/>
													</xs:sequence>
												</xs:complexType>
											</xs:element>
										</xs:sequence>
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:choice>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Payload" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:choice>
						<xs:element name="BinaryDocument">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="Base64Content" type="xs:base64Binary"/>
									<xs:element name="FileName" type="xs:token"/>
									<xs:element name="MIMEType" type="xs:token"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="DocumentReference">
							<xs:annotation>
								<xs:documentation>URL fuer Callback Attachment</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="URL" type="xs:anyURI"/>
									<xs:element name="FileName" type="xs:token"/>
									<xs:element name="MIMEType" type="xs:token"/>
									<xs:element name="MD5Checksum" type="xs:string" minOccurs="0"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="sync" type="xs:boolean"/>
	</xs:complexType>
	<xs:element name="DeliveryResponse" type="DeliveryResponseType"/>
	<xs:complexType name="DeliveryResponseType">
		<xs:choice>
			<xs:element ref="PartialSuccess"/>
			<xs:element ref="Success"/>
			<xs:element ref="Error"/>
		</xs:choice>
	</xs:complexType>
	<!--### ProgressNotifiaction, Failure notices, asynchronous communication ###-->
	<xs:element name="DeliveryNotification" type="DeliveryNotificationType">
		<xs:annotation>
			<xs:documentation>asynchronous communication moazs2app</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="DeliveryNotificationType">
		<xs:choice>
			<xs:element ref="Success"/>
			<xs:element ref="Error"/>
			<xs:element ref="DeliveryStatement"/>
		</xs:choice>
	</xs:complexType>
	<xs:element name="DeliveryNotificationACK" type="DeliveryNotificationACKType">
		<xs:annotation>
			<xs:documentation>Webservice Response of ZSDeliveryNotification</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="DeliveryNotificationACKType">
		<xs:sequence>
			<xs:element ref="AppDeliveryID"/>
			<xs:element ref="MZSDeliveryID"/>
		</xs:sequence>
	</xs:complexType>
	<!--### Globale Elemente ###-->
	<xs:element name="AppDeliveryID" nillable="false">
		<xs:simpleType>
			<xs:restriction base="xs:token">
				<xs:minLength value="1"/>
				<xs:maxLength value="255"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="MZSDeliveryID" type="xs:string"/>
	<xs:element name="Receiver" type="p:PersonDataType"/>
	<!--### Response/Notification Untertypen  ###-->
	<xs:element name="Success" type="SuccessType">
		<xs:annotation>
			<xs:documentation>Zustellstück was successfully delivered to MOA-ZS</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="SuccessType">
		<xs:complexContent>
			<xs:extension base="MessageType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="PartialSuccess" type="PartialSuccessType">
		<xs:annotation>
			<xs:documentation>Delivery Information was successfully delivered to MOA-ZS, Attachements will be loaded</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="PartialSuccessType">
		<xs:complexContent>
			<xs:extension base="MessageType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="Error" type="ErrorType">
		<xs:annotation>
			<xs:documentation>Delivery to MOA-ZS failed, or there was an error in processing</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="ErrorType">
		<xs:complexContent>
			<xs:extension base="MessageType">
				<xs:sequence>
					<xs:element name="Code" type="xs:integer"/>
					<xs:element name="Text" type="xs:string"/>
					<xs:element name="DocumentReference" type="xs:anyURI" minOccurs="0">
						<xs:annotation>
							<xs:documentation>download of callback attachment failed</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="DeliveryStatement" type="DeliveryStatementType">
		<xs:annotation>
			<xs:documentation>Zustellstück was successfully forwarded to the Zustellserver</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="DeliveryStatementType">
		<xs:complexContent>
			<xs:extension base="MessageType">
				<xs:sequence>
					<xs:element name="DeliveryServer" type="xs:anyURI"/>
					<xs:element name="ZSDeliveryID" type="xs:token"/>
					<xs:element name="Timestamp" type="xs:dateTime"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--### Abstrakter Antworten Typ ###-->
	<xs:complexType name="MessageType">
		<xs:annotation>
			<xs:documentation>abstract message type</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="AppDeliveryID"/>
			<xs:element ref="MZSDeliveryID"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>