<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Schema for WS-Reliability Protocol Headers for SOAP 1.1 & SOAP 1.2 protocols
File: ws-reliability-1.1.xsd
Version: 1.1
Date: 2004-Aug-04
Editors:
   Sunil Kunisetty
   Scott Werden
   Doug Bunting

In a case where the text of the specification is shown to be in conflict with schema statements, the Schema statement prevails.

Change Log:
0.01: 09/26/03:  Initial version
0.20: 10/01/03:  Added MessageOrder sub-element to Request
                          Updated Response element to extend HeaderBaseType
0.30: 11/03/03:  Based on resolutions from 10/30/03 F2F
                             - Replace removeAfter with MaxGroupExpiryTime
                             - Add MaxIdleTime as an optional attribute to GroupId
                             - Remove Tiemstamp
                             - Add PollRequest Header
                             - Change Response to support batching
0.40: 01/06/04:  Based on 0.85 Working Draft
                             - Rename MaxGroupExpiryTime to groupExpiryTime
                             - Rename MaxIdleTime to groupMaxIdleDuration
                             - Lower case all attributes
                             - Fix Fault QName
0.50: 01/16/04:  Based on F2F Resolutions
				  - Change groupMaxIdleDuration type to xsd:duration
				  - Add minOccurs=0 to RmBaseType
				  - New Elements (MessageId, RefToMessageIds)
				  - New Fault QNames
0.51: 01/16/04:  Change MessageProcessing fault to MessageProcessingFailure

0.52: 01/27/04:  Fixed typo 

0.60: 02/23/04:  Proposed changes to resolve Rel 108/115 and to merge MessageHeader and Request elements

0.62: 03/08/04: Added replyTo attribute to PollRequest 

0.65: 04/20/04: Replaced 'status' attribute with 'last'

0.66: 04/30/04: Added the GroupAborted Fault and fixed a typo
 
0.70: 05/03/04: Changed the namespace and made it SOAP version agnostic.
		            Allso, removed the SOAP:mustUnderstand attribute.
   
0.90: 05/19/04: Use the ServiceRefType

1.1: 06-07-2004: Renamed the file and target namespace

1.1a:07-20-2004: Added BareURI type

1.1b:07-27-2004: Change SequenceNumberRange to SequenceNumRange
 
1.1c:07-29-2004: Update all mandatory attributes with use=required

1.1d:08-3-2004: Some more updates based on new decisions
                                   
1.1c:08-04-2004: Removed the global ReplyTo and localized the references

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the imlementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.


OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.


Copyright © OASIS Open 2002-2004. All Rights Reserved.


This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.


The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.


This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


-->
<xsd:schema targetNamespace="http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd" xmlns:wsrm="http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd" xmlns:ref="http://docs.oasis-open.org/wsrm/2004/06/reference-1.1.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">

	<xsd:import namespace="http://docs.oasis-open.org/wsrm/2004/06/reference-1.1.xsd" schemaLocation="http://docs.oasis-open.org/wsrm/2004/06/reference-1.1.xsd"/>

	<!-- WSRM Headers -->
	<xsd:element name="Request" type="wsrm:RequestType"/>
	<xsd:element name="Response" type="wsrm:ResponseType"/>
	<xsd:element name="PollRequest" type="wsrm:PollRequestType"/>
	<!-- global BareURI element definition -->
	<xsd:element name="BareURI" type="wsrm:BareURIType"/>
		
	<!-- Describe the BaseTypes -->
	<xsd:complexType name="HeaderBaseType">
		<xsd:sequence>
			<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:anyAttribute namespace="##other" processContents="lax"/>
		<!--
		<xsd:attribute ref="soap11:mustUnderstand" use="required" fixed="1"/>
		  OR
		 <xsd:attribute ref="soap12:mustUnderstand" use="required" fixed="1"/>
               but not both
		-->
	</xsd:complexType>
	<xsd:complexType name="EmptyType">
		<xsd:sequence/>
	</xsd:complexType>
	<xsd:complexType name="ExtensibleType">
		<xsd:sequence>
			<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:anyAttribute namespace="##other" processContents="lax"/>
	</xsd:complexType>
	<!-- The request header Type and its elements-->
	<xsd:complexType name="RequestType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:HeaderBaseType">
				<xsd:sequence>
					<xsd:element name="MessageId" type="wsrm:MessageIdType"/>
					<xsd:element name="ExpiryTime" type="xsd:dateTime"/>
					<xsd:element name="ReplyPattern" type="wsrm:ReplyPatternType"/>
					<xsd:element name="AckRequested" type="wsrm:EmptyType" minOccurs="0"/>
					<xsd:element name="DuplicateElimination" type="wsrm:EmptyType" minOccurs="0"/>
					<xsd:element name="MessageOrder" type="wsrm:EmptyType" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ReplyPatternType">
		<xsd:sequence>
			<xsd:element name="Value" type="wsrm:ReplyPatternTypeValues"/>
			<xsd:element name="ReplyTo"  type="ref:ServiceRefType" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="ReplyPatternTypeValues">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Response"/>
			<xsd:enumeration value="Callback"/>
			<xsd:enumeration value="Poll"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="MessageIdType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:EmptyType">
				<xsd:sequence>
					<xsd:element name="SequenceNum" type="wsrm:SequenceNumType" minOccurs="0"/>
				</xsd:sequence>
				<xsd:attribute name="groupId" type="wsrm:MIDType" use="required"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:simpleType name="MIDType">
		<xsd:restriction base="xsd:anyURI"/>
	</xsd:simpleType>
	<xsd:complexType name="SequenceNumType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:EmptyType">
				<xsd:attribute name="number" type="xsd:unsignedLong" use="required"/>
				<xsd:attribute name="last" type="xsd:boolean" use="optional" default="false"/>
				<xsd:attribute name="groupExpiryTime" type="xsd:dateTime" use="optional"/>
				<xsd:attribute name="groupMaxIdleDuration" type="xsd:duration" use="optional"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- Response Header Type and its elements -->
	<xsd:complexType name="ResponseType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:HeaderBaseType">
				<xsd:choice maxOccurs="unbounded">
					<xsd:element name="NonSequenceReply" type="wsrm:NonSequenceReplyType" />
					<xsd:element name="SequenceReplies" type="wsrm:SequenceRepliesType"/>
				</xsd:choice>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="NonSequenceReplyType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:ExtensibleType">
				<xsd:attribute name="groupId" type="wsrm:MIDType" use="required"/>
				<xsd:attribute name="fault" type="wsrm:FaultCodeEnum" use="optional"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="SequenceRepliesType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:ExtensibleType">
				<xsd:sequence>
					<xsd:element name="ReplyRange" type="wsrm:ReplyRangeType" maxOccurs="unbounded"/>
					<!--  one or more replies each for one or more messages in group -->
				</xsd:sequence>
				<xsd:attribute name="groupId" type="wsrm:MIDType" use="required"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ReplyRangeType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:ExtensibleType">
				<xsd:attribute name="from" type="xsd:unsignedLong" use="required"/>
				<xsd:attribute name="to" type="xsd:unsignedLong" use="required"/>
				<xsd:attribute name="fault" type="wsrm:FaultCodeEnum" use="optional"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="RefToMessageIdsType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:EmptyType">
				<xsd:sequence>
					<xsd:element name="SequenceNumRange" type="wsrm:SequenceNumRangeType" minOccurs="0" maxOccurs="unbounded"/>
				</xsd:sequence>
				<xsd:attribute name="groupId" type="wsrm:MIDType" use="required"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="SequenceNumRangeType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:EmptyType">
				<xsd:attribute name="from" type="xsd:unsignedLong" use="required"/>
				<xsd:attribute name="to" type="xsd:unsignedLong" use="required"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- Poll Request Header Type -->
	<xsd:complexType name="PollRequestType">
		<xsd:complexContent>
			<xsd:extension base="wsrm:HeaderBaseType">
				<xsd:sequence>
					<xsd:element name="RefToMessageIds" type="wsrm:RefToMessageIdsType" maxOccurs="unbounded"/>
					<xsd:element name="ReplyTo"  type="ref:ServiceRefType" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- Fault Codes Allowed-->
	<xsd:simpleType name="FaultCodeEnum">
		<xsd:restriction base="xsd:QName">
			<xsd:enumeration value="wsrm:InvalidMessageId"/>
			<xsd:enumeration value="wsrm:InvalidMessageParameters"/>
			<xsd:enumeration value="wsrm:InvalidPollRequest"/>
			<xsd:enumeration value="wsrm:InvalidRequest"/>
			<xsd:enumeration value="wsrm:InvalidExpiryTime"/>
			<xsd:enumeration value="wsrm:InvalidReplyPattern"/>
			<xsd:enumeration value="wsrm:FeatureNotSupported"/>
			<xsd:enumeration value="wsrm:PermanentProcessingFailure"/>
			<xsd:enumeration value="wsrm:MessageProcessingFailure"/>
			<xsd:enumeration value="wsrm:GroupAborted"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- default reference scheme -->
	<xsd:simpleType name="BareURIType">
		<xsd:restriction base="xsd:anyURI"/>
	</xsd:simpleType>
</xsd:schema>
