<?xml version = "1.0" encoding = "UTF-8"?>
<!--Generated by XML Authority. Conforms to w3c http://www.w3.org/2000/10/XMLSchema-->
<xsd:schema xmlns = "http://ebxml.org/project_teams/transport/messageHeader.xsd"
	 targetNamespace = "http://ebxml.org/project_teams/transport/messageHeader.xsd"
	 xmlns:xlink = "http://www.w3.org/1999/xlink"
	 xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/"
	 xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema"
	 xsd:elementFormDefault="qualified"
	 xsd:attributeFormDefault="qualified"
	 version = "0.99">
	<xsd:import namespace = "http://www.w3.org/1999/xlink" schemaLocation = "http://ebxml.org/project_teams/transport/xlink.xsd"/>
	<xsd:import namespace = "http://schemas.xmlsoap.org/soap/envelope/" schemaLocation = "http://ebxml.org/project_teams/transport/envelope.xsd"/>
	<xsd:import namespace = "http://www.w3.org/XML/1998/namespace" schemaLocation = "http://ebxml.org/project_teams/transport/xml_lang.xsd"/>
	<!--
	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml_lang.xsd"/>
	<xsd:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
	<xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/" schemaLocation="envelope.xsd"/>
	-->
	
	
	<!-- MANIFEST -->
	
	<xsd:element name = "Manifest">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "Reference" maxOccurs = "unbounded"/>
				<xsd:any namespace = "##other" processContents = "lax" minOccurs = "0" maxOccurs = "unbounded"/>
			</xsd:sequence>
			<xsd:attribute ref = "id"/>
			<xsd:attribute name = "version" type = "xsd:string"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:anyAttribute namespace = "http://www.w3.org/2000/10/XMLSchema-instance" processContents = "lax"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "Reference">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "Schema" minOccurs = "0" maxOccurs = "unbounded"/>
				<xsd:element ref = "Description" minOccurs = "0" maxOccurs = "unbounded"/>
				<xsd:any namespace = "##other" processContents = "lax" minOccurs = "0" maxOccurs = "unbounded"/>
			</xsd:sequence>
			<xsd:attribute name = "id" use = "required" type = "xsd:ID"/>
			<xsd:attribute ref = "xlink:type"/>
			<xsd:attribute ref = "xlink:href"/>
			<xsd:attribute ref = "xlink:role"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "Schema">
		<xsd:complexType>
			<xsd:attribute name = "location" use = "required" type = "xsd:uriReference"/>
			<xsd:attribute name = "version" type = "non-empty-string"/>
		</xsd:complexType>
	</xsd:element>
	
	<!-- MESSAGEHEADER -->
	
	<xsd:element name = "MessageHeader">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "From"/>
				<xsd:element ref = "To"/>
				<xsd:element ref = "CPAId"/>
				<xsd:element ref = "ConversationId"/>
				<xsd:element ref = "Service"/>
				<xsd:element ref = "Action"/>
				<xsd:element ref = "MessageData"/>
				<xsd:element ref = "QualityOfServiceInfo" minOccurs = "0"/>
				<xsd:element ref = "Description" minOccurs = "0" maxOccurs = "unbounded"/>
				<xsd:element ref = "SequenceNumber" minOccurs = "0"/>
			</xsd:sequence>
			<xsd:attribute ref = "version"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:anyAttribute namespace = "http://www.w3.org/2000/10/XMLSchema-instance" processContents = "lax"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "CPAId" type = "non-empty-string"/>
	<xsd:element name = "ConversationId" type = "non-empty-string"/>
	<xsd:element name = "Service" type = "non-empty-string"/>
	<xsd:element name = "Action" type = "non-empty-string"/>
	<xsd:element name = "MessageData">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "MessageId"/>
				<xsd:element ref = "Timestamp"/>
				<xsd:element ref = "RefToMessageId" minOccurs = "0"/>
				<xsd:element ref = "TimeToLive" minOccurs = "0"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "MessageId" type = "non-empty-string"/>
	<xsd:element name = "TimeToLive" type = "xsd:timeDuration"/>
	
	<!--
	<xsd:element name="TimeToLive" type="xsd:duration"/>
	-->
	
	<xsd:element name = "QualityOfServiceInfo">
		<xsd:complexType>
			<xsd:sequence/>
			<xsd:attribute name = "deliverySemantics" use = "default" value = "BestEffort">
				<xsd:simpleType>
					<xsd:restriction base = "xsd:NMTOKEN">
						<xsd:enumeration value = "OnceAndOnlyOnce"/>
						<xsd:enumeration value = "BestEffort"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name = "messageOrderSemantics" use = "default" value = "NotGuaranteed">
				<xsd:simpleType>
					<xsd:restriction base = "xsd:NMTOKEN">
						<xsd:enumeration value = "Guaranteed"/>
						<xsd:enumeration value = "NotGuaranteed"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name = "deliveryReceiptRequested" use = "default" value = "None" type = "signedUnsigned.type"/>
		</xsd:complexType>
	</xsd:element>
	
	<!-- TRACE HEADER LIST -->
	
	<xsd:element name = "TraceHeaderList">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "TraceHeader" maxOccurs = "unbounded"/>
			</xsd:sequence>
			<xsd:attribute ref = "id"/>
			<xsd:attribute ref = "version"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "TraceHeader">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "SenderURI"/>
				<xsd:element ref = "ReceiverURI"/>
				<xsd:element ref = "Timestamp"/>
				<xsd:any namespace = "##other" processContents = "lax" minOccurs = "0" maxOccurs = "unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "SenderURI" type = "xsd:uriReference"/>
	<xsd:element name = "ReceiverURI" type = "xsd:uriReference"/>
	<xsd:element name = "SequenceNumber" type = "xsd:positiveInteger"/>
	
	<!-- ACKNOWLEDGEMENT -->
	
	<xsd:element name = "Acknowledgment">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "Timestamp"/>
				<xsd:element ref = "From" minOccurs = "0"/>
			</xsd:sequence>
			<xsd:attribute ref = "id"/>
			<xsd:attribute name = "version" type = "xsd:string"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:attribute name = "type" use = "default" value = "DeliveryReceipt">
				<xsd:simpleType>
					<xsd:restriction base = "xsd:NMTOKEN">
						<xsd:enumeration value = "DeliveryReceipt"/>
						<xsd:enumeration value = "IntermediateAck"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name = "signed" type = "xsd:boolean"/>
		</xsd:complexType>
	</xsd:element>
	
	<!-- ERROR LIST -->
	
	<xsd:element name = "ErrorList">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "Error" maxOccurs = "unbounded"/>
			</xsd:sequence>
			<xsd:attribute ref = "id"/>
			<xsd:attribute ref = "version"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:attribute name = "highestSeverity" use = "default" value = "Warning" type = "severity.type"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "Error">
		<xsd:complexType>
			<xsd:attribute name = "codeContext" use = "required" type = "xsd:uriReference"/>
			<xsd:attribute name = "errorCode" use = "required" type = "non-empty-string"/>
			<xsd:attribute name = "severity" use = "default" value = "Warning" type = "severity.type"/>
			<xsd:attribute name = "location" type = "non-empty-string"/>
			<xsd:attribute ref = "xml:lang"/>
			<xsd:attribute name = "errorMessage" type = "non-empty-string"/>
		</xsd:complexType>
	</xsd:element>
	
	<!-- STATUS DATA -->
	
	<xsd:attribute name = "version" use = "fixed" value = "1.0" type = "non-empty-string"/>
	<xsd:element name = "StatusData">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "RefToMessageId"/>
				<xsd:element ref = "Timestamp" minOccurs = "0"/>
			</xsd:sequence>
			<xsd:attribute ref = "version"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:attribute name = "messageStatus">
				<xsd:simpleType>
					<xsd:restriction base = "xsd:NMTOKEN">
						<xsd:enumeration value = "UnAuthorized"/>
						<xsd:enumeration value = "NotRecognized"/>
						<xsd:enumeration value = "Received"/>
						<xsd:enumeration value = "Processed"/>
						<xsd:enumeration value = "Forwarded"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	
	<!-- VIA  -->
	
	<xsd:element name = "Via">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "CPAId" minOccurs = "0"/>
				<xsd:element ref = "Service" minOccurs = "0"/>
				<xsd:element ref = "Action" minOccurs = "0"/>
			</xsd:sequence>
			<xsd:attribute ref = "version"/>
			<xsd:attribute ref = "soap:mustUnderstand"/>
			<xsd:attribute ref = "soap:actor"/>
			<xsd:attribute name = "syncReply" type = "xsd:boolean"/>
			<xsd:attribute name = "deliveryReceiptRequested" use = "default" value = "None" type = "signedUnsigned.type"/>
			<xsd:attribute name = "reliableMessagingMethod" type = "rmm.type"/>
			<xsd:attribute name = "ackRequested" type = "xsd:boolean"/>
		</xsd:complexType>
	</xsd:element>
	
	<!-- COMMON TYPES -->
	
	<xsd:simpleType name = "non-empty-string">
		<xsd:restriction base = "xsd:string">
			<xsd:minLength value = "1"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name = "rmm.type">
		<xsd:restriction base = "xsd:NMTOKEN">
			<xsd:enumeration value = "ebXML"/>
			<xsd:enumeration value = "Transport"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name = "signedUnsigned.type">
		<xsd:restriction base = "xsd:NMTOKEN">
			<xsd:enumeration value = "Signed"/>
			<xsd:enumeration value = "UnSigned"/>
			<xsd:enumeration value = "None"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name = "severity.type">
		<xsd:restriction base = "xsd:NMTOKEN">
			<xsd:enumeration value = "Warning"/>
			<xsd:enumeration value = "Error"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- COMMON ATTRIBUTES and ELEMENTS -->
	
	<xsd:attribute name = "id" form = "unqualified" type = "xsd:ID"/>
	<xsd:element name = "PartyId">
		<xsd:complexType>
			<xsd:simpleContent>
				<xsd:extension base = "non-empty-string">
					<xsd:attribute name = "type" type = "non-empty-string"/>
				</xsd:extension>
			</xsd:simpleContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "To">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "PartyId"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "From">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref = "PartyId"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "Description">
		<xsd:complexType>
			<xsd:simpleContent>
				<xsd:extension base = "non-empty-string">
					<xsd:attribute ref = "xml:lang"/>
				</xsd:extension>
			</xsd:simpleContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name = "RefToMessageId" type = "non-empty-string"/>
	<xsd:element name = "Timestamp" type = "xsd:timeInstant"/>
	
	<!--
	<xsd:element name="Timestamp" type="xsd:dateTime"/>
	-->
	
</xsd:schema>
