<!-- Mit XMLSpy v2011 rel. 3 sp1 (x64) (http://www.altova.com) von MIC Datenverarbeitung GmbH (MIC Datenverarbeitung GmbH) bearbeitet -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:http://www.mic-cust.com/MicMetadata/5.2" xmlns:err="urn:http://www.mic-cust.com/MicErrorWarningMessage/5.2" targetNamespace="urn:http://www.mic-cust.com/MicMetadata/5.2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="urn:http://www.mic-cust.com/MicErrorWarningMessage/5.2" schemaLocation="MicErrorWarningMessage.xsd"/>
	<xs:element name="Metadata" type="TMicMetadata"/>
	<xs:element name="MessageDetail" type="TMessageDetail"/>
	<xs:element name="Status" type="TStatus"/>
	<xs:complexType name="TMicMetadata">
		<xs:annotation>
			<xs:documentation>Details of the connection to the ERP-System</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="connectionId" type="TConnectionId"/>
			<xs:element name="partnerId" type="TPartnerId">
				<xs:annotation>
					<xs:documentation>The partner ID is a unique ID provided by the MIC-System and classify the ERP-System of the customer. This information is given by MIC.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="dateTime" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>Creation date/time of the message in the ERP-System</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TActionCode">
		<xs:annotation>
			<xs:documentation> Action Requested for automatic processing</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="code">
				<xs:annotation>
					<xs:documentation>Action code for automatic processing</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="1"/>
						<xs:maxLength value="10"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>additional parameters</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:attribute name="key" use="required"/>
					<xs:attribute name="value" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TMessageDetail">
		<xs:annotation>
			<xs:documentation>MIC Interface Message Envelope: description of the single message</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="messageId" type="TMessageId">
				<xs:annotation>
					<xs:documentation>Unique Message ID</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="partyId" type="TPartyId">
				<xs:annotation>
					<xs:documentation>Party ID is used as a separations of departments or single message groups</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="transactionId" type="TTransactionId">
				<xs:annotation>
					<xs:documentation>Unique Identifier of a transaction (declaration) e.g. MRN or LRN</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="sequenceNum" type="TSequenceNum">
				<xs:annotation>
					<xs:documentation>Running number of the transaction Id</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ActionCode" type="TActionCode" minOccurs="0">
				<xs:annotation>
					<xs:documentation>The ActionCode definies the autmoatic process in the MIC-Application. </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="StatusMessage">
		<xs:annotation>
			<xs:documentation>Status message with Metadata and MessageDetail</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Metadata"/>
				<xs:element ref="MessageDetail"/>
				<xs:element ref="Status">
					<xs:annotation>
						<xs:documentation>Set of Messages</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="TStatusResponse">
		<xs:annotation>
			<xs:documentation>Status response message used for synchronous answers</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="Status">
				<xs:annotation>
					<xs:documentation>Set of Messages</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="TStatus">
		<xs:sequence>
			<xs:element name="status">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="OK"/>
						<xs:enumeration value="ERROR"/>
						<xs:enumeration value="WARNING"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:choice>
				<xs:element name="Reference" type="TMetaReference"/>
				<xs:element ref="err:ErrorMessages" minOccurs="0"/>
				<xs:element ref="err:WarningMessages" minOccurs="0"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TMetaReference">
		<xs:sequence>
			<xs:element name="correlationId" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Unique reference number generated in MIC </xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="255"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="company" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>MIC company</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="plant" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>MIC plant</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="referenceType" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Reference type used in MIC </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="referenceSid" type="xs:long" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Reference sid used MIC </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="TTransactionId">
		<xs:annotation>
			<xs:documentation> Envelope:Unique transaction ID used for communication with EDIS webservice</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="100"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TSequenceNum">
		<xs:annotation>
			<xs:documentation> Envelope:running count </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer"/>
	</xs:simpleType>
	<xs:simpleType name="TMessageId">
		<xs:annotation>
			<xs:documentation>envelope:Unique Message ID used for communication in message envelope</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="100"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TPartyId">
		<xs:annotation>
			<xs:documentation> Envelope: communication pary</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TPartnerId">
		<xs:annotation>
			<xs:documentation> Envelope: communication partner</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TConnectionId">
		<xs:annotation>
			<xs:documentation>Connection ID of the MIC-Webservice</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="40"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
