<?xml version="1.0" encoding="UTF-8"?>
<!-- 
DMTF - Distributed Management Task Force, Inc. - http://www.dmtf.org

Document number: DSP8033
Date: 2010-02-19
Version: 1.0.0
Document status: DMTF Standard

Title: WS-Management Enumeration Operations XML Schema

Document type: Specification (W3C XML Schema)
Document language: E

Abstract: XML Schema for WS-Management Enumeration Operations.

Contact group: DMTF WS-Management Work Group, wsman-chair@dmtf.org

Copyright (C) 2008,2009, 2010 Distributed Management Task Force, Inc. (DMTF).
All rights reserved.  DMTF is a not-for-profit association of industry
members dedicated to promoting enterprise and systems management and
interoperability.  Members and non-members may reproduce DMTF
specifications and documents 
provided that correct attribution is given.  As DMTF specifications may
be revised from time to time, the particular version and release date
should always be noted.  Implementation of certain elements of this
standard or proposed standard may be subject to third party patent
rights, including provisional patent rights (herein "patent rights").
DMTF makes no representations to users of the standard as to the
existence of such rights, and is not responsible to recognize, disclose,
or identify any or all such third party patent right, owners or
claimants, nor for any incomplete or inaccurate identification or
disclosure of such rights, owners or claimants.  DMTF shall have no
liability to any party, in any manner or circumstance, under any legal
theory whatsoever, for failure to recognize, disclose, or identify any
such third party patent rights, or for such party's reliance on the
standard or incorporation thereof in its product, protocols or testing
procedures.  DMTF shall have no liability to any party implementing
such standard, whether such implementation is foreseeable or not, nor
to any patent owner or claimant, and shall have no liability or
responsibility for costs or losses incurred if a standard is withdrawn
or modified after publication, and shall be indemnified and held
harmless by any party implementing the standard from any and all claims
of infringement by a patent owner for such implementations.  For
information about patents held by third-parties which have notified the
DMTF that, in their opinion, such patent may relate to or impact
implementations of DMTF standards, visit
http://www.dmtf.org/about/policies/disclosures.php.

Change log:
1.0.0 - 2009-11-01 - Work in progress release
1.0.0 - 2010-02-19 - DMTF Standard release
  -->
<xs:schema
    targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
    xmlns:tns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    blockDefault="#all">

  <xs:import
    namespace="http://www.w3.org/XML/1998/namespace"
    schemaLocation="http://www.w3.org/2001/xml.xsd" />
  <xs:import
    namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    schemaLocation="http://schemas.dmtf.org/wbem/wsman/1/dsp8034_1.0.xsd" />
  <xs:import
	   namespace="http://www.w3.org/2005/08/addressing"
	   schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd" />

  <!-- Types and global elements -->
  <xs:complexType name="FilterType" mixed="true">
    <xs:sequence>
      <xs:any namespace="##other" processContents="lax"
              minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="Dialect" type="xs:anyURI" />
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:complexType>

  <xs:simpleType name="PositiveDurationType">
    <xs:restriction base="xs:duration">
      <xs:minExclusive value="P0Y0M0DT0H0M0S" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NonNegativeDurationType">
    <xs:restriction base="xs:duration">
      <xs:minInclusive value="P0Y0M0DT0H0M0S" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ExpirationType">
    <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType" />
  </xs:simpleType>

  <xs:complexType name="EnumerationContextType">
    <xs:complexContent mixed="true">
      <xs:restriction base="xs:anyType">
        <xs:sequence>
          <xs:any namespace="##other" processContents="lax"
                  minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ItemListType">
    <xs:sequence maxOccurs="unbounded">
      <xs:any namespace="##other" processContents="lax"
              minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LanguageSpecificStringType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute ref="xml:lang" />
        <xs:anyAttribute namespace="##other" processContents="lax" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!--
	  The type of the AnyEPRType is effectively
	  the union of wsa04:EndpointReferenceType and
	  wsa10:EndpointReferenceType. Unfortunately, xs:union only
	  works for simple types. As a result, we have to define
	  the element in an unvalidated way to accommodate either
	  addressing type.
	  -->
	
	<xs:complexType name="AnyEPRType">
	  <xs:sequence>
	    <xs:any minOccurs='1' maxOccurs='unbounded' processContents='skip'
	            namespace='##other' />
	  </xs:sequence>
	</xs:complexType>

  <!-- Enumerate request -->
  <xs:element name="Enumerate">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EndTo" type="tns:AnyEPRType"
                    minOccurs="0" />
        <xs:element name="Expires" type="tns:ExpirationType" 
                    minOccurs="0" />
        <xs:element name="Filter" type="tns:FilterType" 
                    minOccurs="0" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Used for a fault response -->
  <xs:element name="SupportedDialect" type="xs:anyURI" />

  <!-- Enumerate response -->
  <xs:element name="EnumerateResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Expires" type="tns:ExpirationType" 
                    minOccurs="0" />
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Pull request -->
  <xs:element name="Pull">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" />
        <xs:element name="MaxTime" type="tns:PositiveDurationType" 
                    minOccurs="0" />
        <xs:element name="MaxElements" type="xs:positiveInteger" 
                    minOccurs="0" />
        <xs:element name="MaxCharacters" type="xs:positiveInteger" 
                    minOccurs="0" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Pull response -->
  <xs:element name="PullResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" 
                    minOccurs="0" />
        <xs:element name="Items" type="tns:ItemListType" 
                    minOccurs="0" />
        <xs:element name="EndOfSequence" minOccurs="0" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Renew request -->
  <xs:element name="Renew">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" />
        <xs:element name="Expires" type="tns:ExpirationType" 
                    minOccurs="0" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Renew response -->
  <xs:element name="RenewResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Expires" type="tns:ExpirationType" 
                    minOccurs="0" />
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" 
                    minOccurs="0" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- GetStatus request -->
  <xs:element name="GetStatus">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- GetStatus response -->
  <xs:element name="GetStatusResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Expires" type="tns:ExpirationType"
                    minOccurs="0" />
        <xs:any namespace="##other" processContents="lax" 
                minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Release request -->
  <xs:element name="Release">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EnumerationContext" 
                    type="tns:EnumerationContextType" />
      </xs:sequence>
      <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <!-- Release response has an empty body -->

  <!-- EnumerationEnd message -->
  <xs:element name="EnumerationEnd">
    <xs:complexType>
    <xs:sequence>
      <xs:element name="EnumerationContext" 
                  type="tns:EnumerationContextType" />
      <xs:element name="Code" type="tns:OpenEnumerationEndCodeType" />
      <xs:element name="Reason" type="tns:LanguageSpecificStringType" 
                  minOccurs="0" maxOccurs="unbounded" />
      <xs:any namespace="##other" processContents="lax" 
              minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax" />
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="EnumerationEndCodeType">
    <xs:restriction base="xs:anyURI">
    <xs:enumeration value="http://schemas.xmlsoap.org/ws/2004/09/enumeration/SourceShuttingDown" />
    <xs:enumeration value="http://schemas.xmlsoap.org/ws/2004/09/enumeration/SourceCancelling" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OpenEnumerationEndCodeType">
    <xs:union memberTypes="tns:EnumerationEndCodeType xs:anyURI" />
  </xs:simpleType>
</xs:schema>
