<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xmlspec.xsl'?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.1//EN" "xmlspec.dtd" [
<!ENTITY % entities SYSTEM "entitieswd.dtd" >
%entities;
<!ENTITY status "&wsenu.status;" >
<!ENTITY short-status "&wsenu.short-status;" >
 ]>

<spec w3c-doctype="&wsenu.w3c-doctype;" role="&wsenu.role;">
 <header>
  <title>&wsenu.name;</title>
  <w3c-designation>&wsenu.w3c-designation;</w3c-designation>
  <w3c-doctype>"&wsenu.w3c-doctype;</w3c-doctype>
  <pubdate>
   <day>&wsenu.day;</day>
   <month>&wsenu.month;</month>
   <year>&wsenu.year;</year>
  </pubdate>

  <publoc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
         xlink:show="replace" xlink:actuate="onRequest"
         href="&wsenu.dated;">&wsenu.dated;
   </loc>
  </publoc>

  <latestloc>
    <loc xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
        xlink:show="replace" xlink:actuate="onRequest"
        href="http://www.w3.org/TR/&wsenu.shortname;">http://www.w3.org/TR/&wsenu.shortname;
   </loc>
  </latestloc>

  <prevlocs>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
         xlink:show="replace" xlink:actuate="onRequest"
         href="&prev.wsenu.dated;">&prev.wsenu.dated;
   </loc>
  </prevlocs>

  <authlist>
   <author>
    <name>Doug Davis</name>
    <affiliation>IBM</affiliation>
   </author>
   <author>
    <name>Ashok Malhotra</name>
    <affiliation>Oracle</affiliation>
   </author>
   <author>
    <name>Katy Warr</name>
    <affiliation>IBM</affiliation>
   </author>
   <author>
    <name>Wu Chou</name>
    <affiliation>Avaya</affiliation>
   </author>
  </authlist>

  <status id='Status'>
   <p>This is the First Public Working Draft.</p>
   <p>
    Publication as a Working Draft does not imply endorsement by the 
    W3C Membership. This is a draft document and may be updated, replaced 
    or obsoleted by other documents at any time. It is inappropriate to 
    cite this document as other than work in progress.
   </p>
  </status>

  <abstract>
   <p>
    This specification describes a general
    SOAP-based protocol for enumerating a sequence of XML elements that
    is suitable for traversing logs, message queues, or other linear
    information models.
   </p>
  </abstract>

  <langusage>
    <language id="en">English</language>
  </langusage>

  <revisiondesc>
    <p>Last Modified: $Date: 2009/06/03 11:57:24 $</p>
  </revisiondesc>

 </header>

 <body>

  <div1 id="intro">
   <head>Introduction</head>
    <p>
     There are numerous applications for which a
     simple single-request/single-reply metaphor is insufficient for
     transferring large data sets over SOAP. Applications that do not
     fit into this simple paradigm include streaming, traversal, query,
     and enumeration.
    </p>
    <p>
     This specification defines a simple SOAP-based
     protocol for enumeration that allows the data source to provide a
     session abstraction, called an enumeration context, to a consumer
     that represents a logical cursor through a sequence of data items.
     The consumer can then request XML element information items using
     this enumeration context over the span of one or more SOAP
     messages.
    </p>
    <p>
     Somewhere, state must be maintained regarding
     the progress of the iteration. This state may be maintained between
     requests by the data source being enumerated or by the data
     consumer. WS-Enumeration allows the data source to decide, on a
     request-by-request basis, which party will be responsible for
     maintaining this state for the next request.
    </p>
    <p>
     In its simplest form, WS-Enumeration defines a
     single operation, Pull, which allows a data source, in the context
     of a specific enumeration, to produce a sequence of XML elements in
     the body of a SOAP message. Each subsequent Pull operation returns
     the next N elements in the aggregate sequence.
    </p>
    <p>
     A data source may provide a custom mechanism for
     starting a new enumeration. For instance, a data source that
     provides access to a SQL database may support a SELECT operation
     that performs a database query and uses an explicit database cursor
     to iterate through the returned rows. In general, however, it is
     simpler if all data sources support a single, standard operation to
     start an enumeration. This specification defines such an operation,
     Enumerate, that data sources may implement for starting a new
     enumeration of a data source. The Enumerate operation is used to
     create new enumeration contexts for subsequent traversal/retrieval.
     Each Enumerate operation results in a distinct enumeration context,
     each with its own logical cursor/position.
    </p>
    <p>
     It should be emphasized that different
     enumerations of the same data source may produce different results;
     this may happen even for two enumeration contexts created
     concurrently by a single consumer using identical Enumerate
     requests. In general, the consumer of an enumeration should not
     make any assumptions about the ordering or completeness of the
     enumeration; the returned data items represent a selection by the
     data source of items it wishes to present to that consumer at that
     time in that order, with no guarantee that every available item is
     returned or that the order in which items is returned has any
     semantic meaning whatsoever (of course, any specific data source
     may provide strong guarantees, if so desired). In particular, it
     should be noted that the very act of enumerating the contents of a
     data source may modify the contents of the data source; for
     instance, a queue might be represented as a data source such that
     items that are returned in a Pull response are removed from the
     queue.
    </p>

    <div2 id="reqs">
     <head>Requirements</head>
      <p>
       This specification intends to meet the following requirements:
      </p>
      <ulist>
       <item>
        <p>
         Support enumeration of data sources
         that cannot practically fit into a single SOAP
         message.
        </p>
       </item>
       <item>
        <p>
         Support both server-side and
         client-side enumeration state maintenance.
        </p>
       </item>
       <item>
        <p>
         Minimize additional mechanism
         beyond the current web service architecture.
        </p>
       </item>
      </ulist>
    </div2>
  </div1>

  <div1 id="termsNotes">
   <head>Notations and Terminology</head>
    <p>
     This section specifies the notations,
     namespaces, and terminology used in this
     specification.
    </p>

    <div2 id="conv">
     <head>Notational Conventions</head>

     <p>
      The keywords "MUST", "MUST NOT", "REQUIRED",
      "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
      and "OPTIONAL" in this document are to be interpreted as described
      in RFC 2119 <bibref ref="RFC2119"/>.
     </p>
          
     <p>
      This specification uses the following syntax to
      define normative outlines for messages: 
     </p>
     
     <ulist>
      <item>
       <p>
        The syntax appears as an XML
        instance, but values in italics indicate data types instead of
        values.
       </p>
      </item>
      <item>
       <p>
        Characters are appended to elements
        and attributes to indicate cardinality:
       </p>
      </item>
      <item>
       <p>
        "?" (0 or 1)
       </p>
      </item>
      <item>
       <p>
        "*" (0 or more)
       </p>
      </item>
      <item>
       <p>
        "+" (1 or more)
       </p>
      </item>
      <item>
       <p>
        The character "|" is used to
        indicate a choice between alternatives.
       </p>
      </item>
      <item>
       <p>
        The characters "(" and ")" are used to indicate that contained items 
        are to be treated as a group with respect to cardinality or choice.
       </p>
      </item> 
      <item>
       <p>
        The characters "[" and "]" are used to call out references and 
        property names.
       </p>
      </item>
      <item>
       <p>
        Ellipsis (i.e. "...") indicate points of extensibility. 
       </p>
      </item>
      <item>
       <p>
        XML namespace prefixes (see <specref ref="xmlnamespaces"/>) are used 
        to indicate the namespace of the element being
        defined.
       </p>
      </item>
     </ulist>

     <p>
      In addition to Message Information Header properties
      <bibref ref="AddrCore"/>,
      this specification uses the following properties to define messages:
     </p>
 
     <glist>
      <gitem>
       <label> <kw>[Headers]</kw> </label>
       <def>
        <p> Unordered message headers. </p>
       </def>
      </gitem>
 
      <gitem>
       <label> <kw>[Action]</kw> </label>
       <def>
        <p> The value to be used for the wsa:Action URI. </p>
       </def>
      </gitem>
 
      <gitem>
       <label> <kw>[Body]</kw> </label>
       <def>
        <p> A message body. </p>
       </def>
      </gitem>
     </glist>
 
     <p>
      These properties bind to a SOAP Envelope as follows:
     </p>
 
     <example>
     <eg>&lt;s:Envelope&gt;
  &lt;s:Header&gt;
    <kw>[Headers]</kw>
    &lt;wsa:Action&gt;<kw>[Action]</kw>&lt;/wsa:Action&gt;
    ...
  &lt;/s:Header&gt;
  &lt;s:Body&gt;<kw>[Body]</kw>&lt;/s:Body&gt;
&lt;/s:Envelope&gt;</eg>
     </example>

    </div2>

    <div2 id="extensions">
     <head>Considerations on the Use of Extensibility Points</head>

     <p>
      The elements defined in this specification MAY be extended at the 
      points indicated by their outlines and schema. Implementations MAY 
      add child elements and/or attributes at the indicated extension 
      points but MUST NOT contradict the semantics of the parent and/or 
      owner, respectively. If a receiver does not recognize an extension, 
      the receiver SHOULD ignore that extension. Senders MAY indicate 
      the presence of an extension that has to be understood through the use
      of a corresponding SOAP Header with a soap:mustUnderstand attribute 
      with the value "1".
     </p>

     <p>
      Extension elements and attributes MUST NOT use the Web Services 
      Enumeration namespace URI.
     </p>
    </div2>

    <div2 id="namespaces">
     <head>XML Namespaces</head>

      <p>
       The XML namespace URI that MUST be used by
       implementations of this specification is: 
      </p>
      <example>
       <eg><loc href="http://www.w3.org/2009/02/ws-enu">http://www.w3.org/2009/02/ws-enu</loc></eg>
      </example>

      <p>
       <specref ref="xmlnamespaces"/> lists XML namespaces that are used in
       this specification. The choice of any namespace prefix is arbitrary
       and not semantically significant.
      </p>

      <table id='xmlnamespaces' border="1">
       <caption>
        Prefixes and XML namespaces used in this specification
       </caption>

       <tbody>
        <tr>
         <th align="left"> Prefix </th>
         <th align="left"> XML Namespace </th>
         <th align="left"> Specification(s) </th>
        </tr>

        <tr>
         <td> wsen </td>
         <td>
          <loc href="http://www.w3.org/2009/02/ws-enu">
           http://www.w3.org/2009/02/ws-enu
          </loc>
         </td>
         <td> This specification </td>
        </tr>
        <tr>
         <td> s </td>
         <td>
          <loc href="http://www.w3.org/2003/05/soap-envelope">
           http://www.w3.org/2003/05/soap-envelope
          </loc>
         </td>
         <td> SOAP 1.2 <bibref ref="SOAP121"/> </td>
        </tr>
        <tr>
         <td> s11 </td>
         <td>
          <loc href="http://schemas.xmlsoap.org/soap/envelope/">
           http://schemas.xmlsoap.org/soap/envelope/
          </loc>
         </td>
         <td> SOAP 1.1 <bibref ref="SOAP11"/> </td>
        </tr>
        <tr>
         <td> wsa </td>
         <td>
          <loc href="http://www.w3.org/2005/08/addressing">
           http://www.w3.org/2005/08/addressing
          </loc>
         </td>
         <td> WS-Addressing <bibref ref="AddrCore"/> </td>
        </tr>
        <tr>
         <td> wsam </td>
         <td>
          <loc href="http://www.w3.org/2007/05/addressing/metadata">
           http://www.w3.org/2007/05/addressing/metadata
          </loc>
         </td>
         <td> WS-Addressing <bibref ref="AddrCore"/> </td>
        </tr>
        <tr>
         <td> xs </td>
         <td>
          <loc href="http://www.w3.org/2001/XMLSchema">
           http://www.w3.org/2001/XMLSchema
          </loc>
         </td>
         <td> 
          XML Schema <bibref ref="XMLSchema1"/>, <bibref ref="XMLSchema2"/>
         </td>
        </tr>
        <tr>
         <td> wsdl </td>
         <td>
          <loc href="http://schemas.xmlsoap.org/wsdl">
           http://schemas.xmlsoap.org/wsdl
          </loc>
         </td>
         <td> WSDL/1.1 <bibref ref="WSDL11"/> </td>
        </tr>
       </tbody>
      </table>

      <p>
       The working group intends to update the value of the Web Services
       Enumeration namespace URI each time a new version of this document is
       published until such time that the document reaches Candidate
       Recommendation status. Once it has reached Candidate Recommendation
       status, the working group intends to maintain the value of the
       Web Services Enumeration namespace URI that was assigned in the 
       Candidate Recommendation unless significant changes are made that 
       impact the implementation or break post-CR implementations of the
       specification. Also see
       <loc href="http://www.w3.org/2001/tag/doc/namespaceState.html">
        http://www.w3.org/2001/tag/doc/namespaceState.html
       </loc> and
       <loc href="http://www.w3.org/2005/07/13-nsuri">
        http://www.w3.org/2005/07/13-nsuri
       </loc>.
      </p>

    </div2>

    <div2 id="terms">
     <head>Terminology</head>

     <glist>
      <gitem>
       <label> Consumer </label>
       <def>
        <p>
         The Web service that is requesting the data
         enumeration from the data source
        </p>
       </def>
      </gitem>
      
      <gitem>
       <label> Data source </label>
       <def>
        <p>
         A Web service that supports traversal using
         enumeration contexts via the Enumerate operation defined in this
         specification
        </p>
       </def>
      </gitem>

      <gitem>
       <label> Enumeration context </label>
       <def>
        <p>
         A session context that represents a specific
         traversal through a logical sequence of XML element information
         items using the Pull operation defined in this
         specification
        </p>
       </def>
      </gitem>
     </glist>
    </div2>

    <div2 id="compliance">
     <head>Compliance</head>
     
     <p>
      An implementation is not compliant with this specification if it fails to
      satisfy one or more of the MUST or REQUIRED level requirements defined herein.
      A SOAP Node MUST NOT use the XML namespace identifier for this specification
      (listed in <specref ref="namespaces"/>) within SOAP Envelopes unless it is compliant
      with this specification. 
     </p>
     
     <p>
      Normative text within this specification takes precedence over the XML Schema
      and WSDL descriptions, which in turn take precedence over outlines, which in
      turn take precedence over examples. 
     </p>
     
     <p>
      All messages defined by this specification MUST be sent to a Web service that
      is addressable by an EPR (see <bibref ref="AddrCore"></bibref>). 
     </p>
     
    </div2>

  </div1>

  <div1 id="EnumMsgs">
   <head>Enumeration Messages</head>

   <p>
    Enumeration contexts represent a specific
    traversal through a sequence of XML information items. An Enumerate
    operation may be used to establish an enumeration context from a
    data source. A Pull operation is used to fetch information items
    from a data source according to a specific enumeration context. A
    Release operation is used to tell a data source that the consumer
    is abandoning an enumeration context before it has completed the
    enumeration.
   </p>
   <p>
    Enumeration contexts are represented as XML data
    that is opaque to the consumer. Initially, the consumer gets an
    enumeration context from the data source by means of an Enumerate
    operation. The consumer then passes that XML data back to the data
    source in the Pull request. Optionally, the data source may return
    an updated enumeration context in the Pull response; when present,
    this new enumeration context should replace the old one on the
    consumer, and should be passed to the data source in all future
    responses until and unless the data source again returns an updated
    enumeration context.
   </p>
   <p>
    Consumers should not reuse old enumeration
    contexts that have been replaced by the data source. Using a
    replaced enumeration context in a Pull response MAY yield undefined
    results, including being ignored or generating a
    fault.
   </p>
   <p>
    Once the last element in a sequence has been
    returned, or the enumeration context has expired, the enumeration
    context is considered invalid and the result of subsequent
    operations referencing that context is undefined.
   </p>
   <p>
    Callers MAY issue a Release operation against a
    valid enumeration context at any time, which causes the enumeration
    context to become invalid and allows the data source to free up any
    resources it may have allocated to the enumeration. Issuing a
    Release operation prior to reaching the end of the sequence of
    elements is explicitly allowed; however, no further operations
    should be issued after a Release.
   </p>
   <p>
    In addition, the data source MAY invalidate an
    enumeration context at any time, as necessary.
   </p>

   <div2 id="Enumerate">
    <head>Enumerate</head>

    <p>
     All data sources MUST support some operation
     that allows an enumeration to be started. A data source MAY support
     the Enumerate operation, or it may provide some other mechanism for
     starting an enumeration and receiving an enumeration
     context.
    </p>
    <p>
     The Enumerate operation is initiated by sending
     an Enumerate request message to the data source. The Enumerate
     request message MUST be of the following form:
    </p>
    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/Enumerate

<kw>[Body]</kw>
  &lt;wsen:Enumerate ...>
    &lt;wsen:EndTo&gt;<emph>endpoint-reference</emph>&lt;/wsen:EndTo> ?
    &lt;wsen:Expires&gt;(<emph>xs:dateTime</emph> | <emph>xs:duration</emph>)&lt;/wsen:Expires&gt; ?
    &lt;wsen:Filter Dialect="<emph>xs:anyURI</emph>"?> <emph>xs:any</emph> &lt;/wsen:Filter> ?
    <emph>xs:any</emph>*
  &lt;/wsen:Enumerate></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/wsen:Enumerate/wsen:EndTo </label>
      <def>
       <p>
        This optional element denotes where to send
        an EnumerationEnd message if the enumeration is terminated
        unexpectedly 
        (see <specref ref="EnumerationEnd"/>). 
        If present, this element MUST
        be of type wsa:EndpointReferenceType. Default is to not send this
        message.  The endpoint to which the EndTo EPR 
        refers MUST support the EnumerationEndPortType portType.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:Enumerate/wsen:Expires </label>
      <def>
       <p>
        Requested expiration time for the
        enumeration. (No implied value.) The data source defines the actual
        expiration and is not constrained to use a time less or greater
        than the requested expiration. The expiration time may be a
        specific time or a duration from the enumeration's creation time.
        Both specific times and durations are interpreted based on the data
        source's clock.
       </p>
       <p>
        If this element does not appear, then the
        request is for an enumeration that will not expire. That is, the
        consumer is requesting the data source to create an enumeration
        with an indefinite lifetime. If the data source grants such an
        enumeration, it will terminate when the end of the enumeration is
        reached, or if the consumer sends a Release request, or by the data
        source at any time for reasons such as connection termination,
        resource constraints, or system shut-down.
       </p>
       <p>
        If the expiration time is either a zero
        duration or a specific time that occurs in the past according to
        the data source, then the request MUST fail, and the data source
        MAY generate a wsen:InvalidExpirationTime fault indicating that an 
        invalid expiration time was requested.
       </p>

       <p>
        Some data sources may not have a "wall time"
        clock available, and so are able only to accept durations as
        expirations. If such a source receives an Enumerate request
        containing a specific time expiration, then the request MUST fail;
        if so, the data source SHOULD generate a 
        wsen:UnsupportedExpirationTime fault indicating that an
        unsupported expiration type was requested.
       </p>

      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:Enumerate/wsen:Filter </label>
      <def>
       <p>
        This optional element contains a Boolean
        predicate in some dialect (see <specref ref="Dialect"/>) 
        that all elements of
        interest must satisfy. The resultant enumeration context MUST NOT
        return elements for which this predicate expression evaluates to
        the value false. If this element is absent, then the implied value
        is the expression true(), indicating that no filtering is
        desired.
       </p>
       <p>
        If the data source does not support
        filtering, the request MUST fail, and the data source MAY generate
        a wsen:FilteringNotSupported fault.
       </p>

       <p>
        If the data source supports filtering but
        cannot honor the requested filter dialect, the request MUST fail,
        and the data source MAY generate a 
        wsen:FilterDialectRequestUnavailable fault.
       </p>

       <p>
        If the data source supports filtering and the
        requested dialect but cannot process the requested filter content,
        the request MUST fail, and the data source MAY generate a 
        wsen:CannotProcessFilter fault.
       </p>

      </def>
     </gitem>

     <gitem>
      <label id="Dialect"> <kw>[Body]</kw>/wsen:Enumerate/wsen:Filter/@Dialect </label>
      <def>
       <p>
        Implied value is
        "http://www.w3.org/TR/1999/REC-xpath-19991116". 
       </p>
       <p>
        <kw>[Body]</kw>/wsen:Enumerate/wsen:Filter/@Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116"
       </p>
       <p>
        Value of <kw>[Body]</kw>/wsenu:Enumerate/wsen:Filter is
        an XPath <bibref ref="XPath1"/>
        predicate expression (PredicateExpr); the context
        of the expression is:
       </p>

       <ulist>
        <item>
         <p>
          Context Node: any XML element that
          could be returned as a direct child of the wsen:Items
          element.
         </p>
        </item>

        <item>
         <p>
          Context Position: 1.
         </p>
        </item>

        <item>
         <p>
          Context Size: 1.
         </p>
        </item>

        <item>
         <p>
          Variable Bindings: None.
         </p>
        </item>

        <item>
         <p>
          Function Libraries: Core Function
          Library <bibref ref="XPath1"/>.
         </p>
        </item>

        <item>
         <p>
          Namespace Declarations: The
          [in-scope namespaces] property <bibref ref="XMLInfoset"/>
          of <kw>[Body]</kw>/wsen:Enumerate/wsen:Filter.
         </p>
        </item>
       </ulist>
      </def>
     </gitem>
    </glist>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>

    <p>
     If included within the Enumerate request message, the 
     wsen:EndTo SHOULD have some cursory validity checking performed before
     the Enumerate response is returned. While not all errors can be detected
     prior to sending a message to that EPR, some obvious ones can be
     detected.  For example, an unsupported transport specified within the
     wsa:Address IRI.
     Detecting these errors during Enumerate processing will lessen the chances
     of the consumer creating an unusable enumeration.  If this check is
     performed and a problem is detected then the event source MAY generate
     a wsen:UnusableEPR fault rather than returning the EnumerateResponse.
     message.
    </p>
  
    <p>
     Upon successful processing of an Enumerate
     request message, a data source is expected to create an enumeration
     context and return that context in an Enumerate response message,
     which MUST adhere to the following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/EnumerateResponse

<kw>[Body]</kw>
  &lt;wsen:EnumerateResponse ...>
    &lt;wsen:Expires&gt;(<emph>xs:dateTime</emph> | <emph>xs:duration</emph>)&lt;/wsen:Expires> ?
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext>
    <emph>xs:any</emph>*
  &lt;/wsen:EnumerateResponse></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/wsen:EnumerateResponse/wsen:Expires </label>
      <def>
       <p>
        The expiration time assigned by the data
        source. The expiration time MAY be either an absolute time or a
        duration but SHOULD be of the same type as the requested expiration
        (if any).
       </p>
       <p>
        If this element does not appear, then the
        enumeration will not expire. That is, the enumeration has an
        indefinite lifetime. It will terminate when the end of the
        enumeration is reached, or if the consumer sends a Release request,
        or by the data source at any time for reasons such as connection
        termination, resource constraints, or system
        shut-down.
       </p>
      </def>
     </gitem>

     <gitem>
      <label>
       <kw>[body]</kw>/wsen:EnumerateResponse/wsen:EnumerationContext
      </label>
      <def>
       <p>
        The required EnumerationContext element
        contains the XML representation of the new enumeration context. The
        consumer is required to pass this XML data in Pull requests for
        this enumeration context, until and unless a PullResponse message
        updates the enumeration context.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     <specref ref="enumReq"/> lists a sample Enumerate request.
    </p>

    <example id="enumReq">
     <head>Enumerate request</head>

     <eg>(01) &lt;s:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
(02)    xmlns:wsa="http://www.w3.org/2005/08/addressing"
(03)    xmlns:wsen="http://www.w3.org/2009/02/ws-enu">
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/Enumerate
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:MessageID>
(09)       uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:MessageID>
(11)     &lt;wsa:To>http://www.example.com/relayAgent/enum19&lt;/wsa:To>
(12)     &lt;wsa:ReplyTo>
(13)       &lt;wsa:Address> 
(14)         http://www.w3.org/2005/08/addressing/anonymous
(15)       &lt;/wsa:Address>
(16)     &lt;/wsa:ReplyTo>
(17)   &lt;/s:Header>
(18)   &lt;s:Body>
(19)     &lt;wsen:Enumerate>
(20)       &lt;wsen:Expires> PT10M &lt;/wsen:Expires>
(21)     &lt;/wsen:Enumerate>
(22)   &lt;/s:Body>
(23) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="enumReq"/> indicate this message
     is an Enumerate request and that the data source is expected to
     respond with an Enumerate response message. The wsen:Expires
     element on line (20) indicates that the consumer would like an
     enumeration context that will be good for at least 10 minutes; that
     is, it expects to complete its enumeration within a 10 minute
     period. No wsen:Filter element is present, so the resultant
     enumeration context is expected to return all available
     elements.
    </p>

    <p>
     <specref ref="enumRes"/> lists a response to the request in 
     <specref ref="enumReq"/>.
    </p>

    <example id="enumRes">
     <head>Response to Enumerate request</head>
     <eg>(01) &lt;s:Envelope xmlns:S='http://www.w3.org/2003/05/soap-envelope'
(02)     xmlns:wsen='http://www.w3.org/2009/02/ws-enu'
(03)     xmlns:wsa='http://www.w3.org/2005/08/addressing'>
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/EnumerateResponse
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:RelatesTo>
(09)         uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:RelatesTo>
(11)     &lt;wsa:To>
(12)       http://www.w3.org/2005/08/addressing/anonymous
(13)     &lt;wsa:To>
(14)   &lt;/s:Header>
(15)   &lt;s:Body>
(16)     &lt;wsen:EnumerateResponse>
(17)       &lt;wsen:Expires> PT15M &lt;/wsen:Expires>
(18)       &lt;wsen:EnumerationContext>
(19)         123
(20)       &lt;/wsen:EnumerationContext>
(21)     &lt;/wsen:EnumerateResponse>
(22)    &lt;/s:Body>
(23) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="enumRes"/> indicate this message
     is an Enumerate response message. Line (17) indicates that the data
     source has actually created an enumeration context with a lifetime
     of 15 minutes. Lines (18-20) are the XML representation of the
     enumeration context that supports the Pull operation defined
     below.
    </p>
   </div2>

   <div2 id="Pull">
    <head>Pull</head>

    <p>
     The Pull operation is initiated by sending a
     Pull request message to the data source. The Pull request message
     MUST be of the following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/Pull

<kw>[Body]</kw>
  &lt;wsen:Pull ...>
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext>
    &lt;wsen:MaxTime&gt;<emph>xs:duration</emph>&lt;/wsen:MaxTime> ?
    &lt;wsen:MaxElements&gt;<emph>xs:long</emph>&lt;/wsen:MaxElements> ?
    &lt;wsen:MaxCharacters&gt;<emph>xs:long</emph>&lt;/wsen:MaxCharacters> ?
    <emph>xs:any</emph>*
  &lt;/wsen:Pull></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/wsen:Pull/wsen:EnumerationContext </label>
      <def>
       <p>
        This required element contains the XML data
        that represents the current enumeration context.
       </p>
       <p> 
        If the enumeration context is not valid,
        either because it has been replaced in the response to another Pull
        request, or because it has completed (EndOfSequence has been
        returned in a Pull response), or because it has been Released, or
        because it has expired, or because the data source has had to
        invalidate the context, then the data source SHOULD fail the
        request, and MAY generate the a wsen:InvalidEnumerationContext fault.
       </p>

       <p>
        Note that the data source may not be able to
        determine that an enumeration context is not valid, especially if
        all of the state associated with the enumeration is kept in the
        enumeration context and refreshed on every
        PullResponse.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:Pull/wsen:MaxTime </label>
      <def>
       <p>
        This optional element (of type xs:duration)
        indicates the maximum amount of time the initiator is willing to
        allow the data source to assemble the Pull response. When this
        element is absent, the data source is not required to limit the
        amount of time it takes to assemble the Pull
        response.
       </p>
       <p>
        This is useful with data sources that
        accumulate elements over time and package them into a single Pull
        response.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:Pull/wsen:MaxElements </label>
      <def>
       <p>
        This optional element (of type xs:long)
        indicates the number of items (child elements of wsen:Items in the
        Pull response) the consumer is willing to accept. When this element
        is absent, its implied value is 1. Implementations MUST NOT return
        more than this number of elements in the Pull response message.
        Implementations MAY return fewer than this number based on either
        the wsen:MaxTime timeout, the wsen:MaxCharacters size limit, or
        implementation-specific constraints.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:Pull/wsen:MaxCharacters </label>
      <def>
       <p>
        This optional element (of type xs:long)
        indicates the maximum size of the returned elements, in Unicode
        characters, that the initiator is willing to accept. When this
        element is absent, the data source is not required to limit the
        number of characters in the Pull response. Implementations MUST NOT
        return a Pull response message whose wsen:Items element is larger
        than MaxCharacters. Implementations MAY return a smaller message
        based on the wsen:MaxTime timeout, the wsen:MaxElements limit, or
        implementation-specific constraints.
       </p>
       <p>
        Even if a Pull request contains a
        MaxCharacters element, the consumer MUST be prepared to receive a
        Pull response that contains more data characters than specified, as
        XML canonicalization or alternate XML serialization algorithms may
        change the size of the representation.
       </p>
       <p>
        It may happen that the next item the data
        source would return to the consumer is larger than MaxCharacters.
        In this case, the data source MAY skip the item, or MAY return an
        abbreviated representation of the item that fits inside
        MaxCharacters. If the data source skips the item, it MAY return it
        as part of the response to a future Pull request with a larger
        value of MaxCharacters, or it MAY omit it entirely from the
        enumeration. If the oversize item is the last item to be returned
        for this enumeration context and the data source skips it, it MUST
        include the wsen:EndOfSequence item in the Pull response and
        invalidate the enumeration context; that is, it may not return zero
        items but not consider the enumeration completed. See the
        discussion of wsen:EndOfSequence below.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>
 
    <p>
     Upon receipt of a Pull request message, the
     data source may wait as long as it deems necessary (but not longer
     than the value of the wsen:MaxTime element, if present) to produce
     a message for delivery to the consumer. The data source MUST
     recognize the wsen:MaxTime element and return a
     wsen:TimedOut fault if no elements are available prior to the 
     request message's deadline:
    </p>

    <p>
     Note, however, that this fault SHOULD NOT cause
     the enumeration context to become invalid (of course, the data
     source may invalidate the enumeration context for other reasons).
     That is, the requestor should be able to issue additional Pull
     requests using this enumeration context after receiving this fault.
    </p>

    <p>
     Upon successful processing of a Pull request
     message, a data source is expected to return a Pull response
     message, which MUST adhere to the following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/PullResponse

<kw>[Body]</kw>
  &lt;wsen:PullResponse ...>
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext> ?
    &lt;wsen:Items> ?
      &lt;xs:any> enumeration-specific element &lt;/xs:any> +
    &lt;/wsen:Items>
    &lt;wsen:EndOfSequence/> ?
    <emph>xs:any</emph>*
  &lt;/wsen:PullResponse></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label> 
       <kw>[Body]</kw>/wsen:PullResponse/wsen:EnumerationContext 
      </label>
      <def>
       <p>
        The optional EnumerationContext element, if
        present, contains a new XML representation of the current
        enumeration context. The consumer is required to replace the prior
        representation with the contents of this element.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> 
       <kw>[Body]</kw>/wsen:PullResponse/wsen:Items/<emph>xs:any</emph>
      </label>
      <def>
       <p>
        The optional Items element contains one or
        more enumeration-specific elements, one for each element being
        returned. 
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:PullResponse/wsen:EndOfSequence </label>
      <def>
       <p>
        This optional element indicates that no more
        elements are available from this enumeration. Additionally, once
        this element is returned in a Pull response message, subsequent
        Pull requests using that enumeration context SHOULD generate a
        wsen:InvalidEnumerationContext fault message; in any case, they
        MUST NOT return a valid PullResponse.
       </p>
      </def>
     </gitem>
    </glist>


    <p>
     Note that at least one of wsen:Items or
     wsen:EndOfSequence MUST appear. It is possible for both to appear
     if items are returned and the sequence is exhausted. Similarly,
     wsen:EnumerationContext and wsen:EndOfSequence MUST NOT both
     appear; neither may appear, or one without the other, but not both
     in the same PullResponse.
    </p>
 
    <p>
     <specref ref="pullReq"/> lists a Pull request.
    </p>

    <example id="pullReq">
     <head>Pull request</head>
     <eg>(01) &lt;s:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
(02)    xmlns:wsa="http://www.w3.org/2005/08/addressing"
(03)    xmlns:wsen="http://www.w3.org/2009/02/ws-enu">
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/Pull
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:MessageID>
(09)       uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:MessageID>
(11)     &lt;wsa:To>http://www.example.com/relayAgent&lt;/wsa:To>
(12)     &lt;wsa:ReplyTo>
(13)       &lt;wsa:Address> 
(14)         http://www.w3.org/2005/08/addressing/anonymous
(15)       &lt;/wsa:Address>
(16)     &lt;/wsa:ReplyTo>
(17)   &lt;/s:Header>
(18)   &lt;s:Body>
(19)     &lt;wsen:Pull>
(20)       &lt;wsen:EnumerationContext>123&lt;/wsen:EnumerationContext>
(21)       &lt;wsen:MaxTime>P30S&lt;/wsen:MaxTime>
(22)       &lt;wsen:MaxElements>10&lt;/wsen:MaxElements>
(23)     &lt;/wsen:Pull>
(24)   &lt;/s:Body>
(25) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="pullReq"/> indicate this message
     is a Pull request and that the data source is expected to respond
     with a Pull response message. Line (21) indicates that the response
     message should be generated no more than 30 seconds after receipt
     of the Pull request message. Line (22) indicates that no more than
     10 elements should be returned in the body of the Pull response
     message.
    </p>

    <p>
     <specref ref="pullRes"/> lists a response to the request in 
     <specref ref="pullReq"/>.
    </p>

    <example id="pullRes">
     <head>Response to Pull request</head>
     <eg>(01) &lt;s:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
(02)     xmlns:wsen="http://www.w3.org/2009/02/ws-enu"
(03)     xmlns:wsa="http://www.w3.org/2005/08/addressing">
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/PullResponse
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:RelatesTo>
(09)       uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:RelatesTo>
(11)     &lt;wsa:To>
(12)       http://www.w3.org/2005/08/addressing/anonymous
(13)     &lt;wsa:To>
(14)   &lt;/s:Header>
(15)   &lt;s:Body>
(16)     &lt;wsen:PullResponse>
(17)       &lt;wsen:Items xmlns:xx="http://fabrikam123.example.com/schema/log">
(18)         &lt;xx:LogEntry id="1">System booted&lt;/xx:LogEntry>
(19)         &lt;xx:LogEntry id="2">AppX started&lt;/xx:LogEntry>
(20)         &lt;xx:LogEntry id="3">John Smith logged on&lt;/xx:LogEntry>
(21)         &lt;xx:LogEntry id="4">AppY started&lt;/xx:LogEntry>
(22)         &lt;xx:LogEntry id="5">AppX crashed&lt;/xx:LogEntry>
(23)       &lt;/wsen:Items>
(24)       &lt;wsen:EndOfSequence/>
(25)      &lt;/wsen:PullResponse>
(26)    &lt;/s:Body>
(27) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="pullRes"/> indicate this message
     is a Pull response message. Lines (18-22) are the five elements
     returned by this Pull request. The presence of a wsen:EndOfSequence
     element (line (24)) indicates that no more elements are available
     and that the enumeration context is now invalid.
    </p>

    <p>
     The consumer SHOULD NOT issue additional Pull
     request messages after a Pull response containing a
     wsen:EndOfSequence element has been returned. Similarly, upon
     receipt of a Pull response containing a wsen:EndOfSequence element,
     the consumer SHOULD NOT issue a Release operation to signal that
     the enumeration context is no longer needed. 
    </p>

    <p>
     If the consumer does issue a Pull or Release on
     an invalid enumeration context, the result is undefined: the data
     source MAY ignore the request or MAY return a
     wsen:InvalidEnumerationContext fault or MAY
     take some other action.
    </p>
   </div2>

   <div2 id="Renew">
    <head>Renew</head>

    <p>
     Data sources MUST support requests to renew
     enumerations.
    </p>

    <p>
     To renew an enumeration, the consumer sends a
     request of the following form to the data source:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/Renew

<kw>[Body]</kw>
  &lt;wsen:Renew ...>
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext>
    &lt;wsen:Expires&gt;(<emph>xs:dateTime</emph> | <emph>xs:duration</emph>)&lt;/wsen:Expires> ?
    <emph>xs:any</emph>*
  &lt;/wsen:Renew></eg>
    </example>

    <p>
     Components of the outline listed above are
     additionally constrained as for a request to create an enumeration
     (see <specref ref="Enumerate"/>) with the following
     addition(s):
    </p>

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/wsen:Renew/wsen:EnumerationContext </label>
      <def>
       <p>
        This required element contains the XML data
        that represents the current enumeration context.
       </p>
       <p>
        If the enumeration context is not valid,
        either because it has been replaced in the response to another Pull
        request, or because it has completed (EndOfSequence has been
        returned in a Pull response), or because it has been Released, or
        because it has expired, or because the data source has had to
        invalidate the context, then the data source SHOULD fail the
        request, and MAY generate a wsen:InvalidEnumerationContext fault.
       </p>

      </def>
     </gitem>
    </glist>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>

    <p>
     If the data source accepts a request to renew an
     enumeration, it MUST reply with a response of the following
     form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/RenewResponse

<kw>[Body]</kw>
  &lt;wsen:RenewResponse ...>
    &lt;wsen:Expires&gt;(<emph>xs:dateTime</emph> | <emph>xs:duration</emph>)&lt;/wsen:Expires> ?
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext> ?
    <emph>xs:any</emph>*
  &lt;/wsen:RenewResponse></eg>
    </example>

    <p>
     Components of the outline listed above are
     constrained as for a response to an Enumerate request 
     (see <specref ref="Enumerate"/>) with the following addition:
    </p>

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/wsen:RenewResponse/wsen:Expires </label>
      <def>
       <p>
        If the requested expiration is a duration,
        then the implied start of that duration is the time when the data
        source starts processing the Renew request.
       </p>
      </def>
     </gitem>

     <gitem>
      <label>
       <kw>[Body]</kw>/wsen:RenewResponse/wsen:EnumerationContext
      </label>
      <def>
       <p>
        This element is optional in this response.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     If the data source chooses not to renew this
     enumeration, the request MUST fail, and the data source SHOULD
     generate a wsen:UnableToRenew fault indicating that the 
     renewal was not accepted.
    </p>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>
   </div2>

   <div2 id="GetStatus">
    <head>GetStatus</head>

    <p>
     To get the status of an enumeration, the
     subscriber sends a request of the following form to the data
     source:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/GetStatus

<kw>[Body]</kw>
  &lt;wsen:GetStatus ...>
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext> ?
    <emph>xs:any</emph>*
  &lt;/wsen:GetStatus></eg>
    </example>

    <p>
     Components of the outline listed above are
     additionally constrained as for a request to renew an enumeration
     (see <specref ref="Renew"/>). Other components of the outline above are
     not further constrained by this specification.
    </p>

    <p>
     If the enumeration is valid and has not expired,
     the data source MUST reply with a response of the following
     form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/GetStatusResponse

<kw>[Body]</kw>
  &lt;wsen:GetStatusResponse ...>
    &lt;wsen:Expires&gt;(<emph>xs:dateTime</emph> | <emph>xs:duration</emph>)&lt;/wsen:Expires> ?
    <emph>xs:any</emph>*
  &lt;/wsen:GetStatusResponse></eg>
    </example>

    <p>
     Components of the outline listed above are
     constrained as for a response to a renew request 
     (see <specref ref="Renew"/>). Other components of the outline above are 
     not further constrained by this specification.
    </p>
   </div2>

   <div2 id="Release">
    <head>Release</head>

    <p>
     The Release operation is initiated by sending a
     Release request message to the data source. The Release request
     message MUST be of the following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/Release

<kw>[Body]</kw>
  &lt;wsen:Release ...>
    &lt;wsen:EnumerationContext>...&lt;/wsen:EnumerationContext>
    <emph>xs:any</emph>*
  &lt;/wsen:Release></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label>
       <kw>[Body]</kw>/wsen:Release/wsen:EnumerationContext
      </label>
      <def>
       <p>
        This required element contains the XML data
        that represents the enumeration context being
        abandoned.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>

    <p>
     Upon successful processing of a Release request
     message, a data source is expected to return a Release response
     message, which MUST adhere to the following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/ReleaseResponse

<kw>[Body]</kw>
  &lt;wsen:ReleaseResponse ...>
    <emph>xs:any</emph>*
  &lt;/wsen:ReleaseResponse></eg>
    </example>

    <!--
    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
    </glist>
    -->

    <p>
     <specref ref="releaseReq"/> lists a Release request.
    </p>

    <example id="releaseReq">
     <head>Release request</head>

     <eg>(01) &lt;s:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
(02)    xmlns:wsa="http://www.w3.org/2005/08/addressing"
(03)    xmlns:wsen="http://www.w3.org/2009/02/ws-enu">
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/Release
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:MessageID>
(09)       uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:MessageID>
(11)     &lt;wsa:To>http://www.example.com/relayAgent&lt;/wsa:To>
(12)     &lt;wsa:ReplyTo>
(13)       &lt;wsa:Address> 
(14)         http://www.w3.org/2005/08/addressing/anonymous
(15)       &lt;/wsa:Address>
(16)     &lt;/wsa:ReplyTo>
(17)   &lt;/s:Header>
(18)   &lt;s:Body>
(19)     &lt;wsen:Release>
(20)       &lt;wsen:EnumerationContext>123&lt;/wsen:EnumerationContext>
(21)     &lt;/wsen:Release>
(22)   &lt;/s:Body>
(23) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="releaseReq"/> indicate this message
     is a Release request and that the data source is expected to
     respond with a Release response message. Line (20) identifies the
     enumeration context to be released.
    </p>

    <p>
     <specref ref="releaseRes"/> lists a response to the request in 
     <specref ref="releaseReq"/>.
    </p>

    <example id="releaseRes">
     <head>Response to Release request</head>
     <eg>(01) &lt;s:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
(02)     xmlns:wsen="http://www.w3.org/2009/02/ws-enu"
(03)     xmlns:wsa="http://www.w3.org/2005/08/addressing">
(04)   &lt;s:Header>
(05)     &lt;wsa:Action>
(06)       http://www.w3.org/2009/02/ws-enu/ReleaseResponse
(07)     &lt;/wsa:Action>
(08)     &lt;wsa:RelatesTo>
(09)       uuid:e7c5726b-de29-4313-b4d4-b3425b200839
(10)     &lt;/wsa:RelatesTo>
(11)     &lt;wsa:To>
(12)       http://www.w3.org/2005/08/addressing/anonymous
(13)     &lt;wsa:To>
(14)   &lt;/s:Header>
(15)   &lt;s:Body>
(16)     &lt;wsen:ReleaseResponse/>
(17)   &lt;/s:Body>
(18) &lt;/s:Envelope&gt;</eg>
    </example>

    <p>
     Lines (05-07) in <specref ref="releaseRes"/> indicate this message
     is a Release response message.
    </p>
   </div2>

   <div2 id="EnumerationEnd">
    <head>EnumerationEnd</head>

    <p>
     If the data source terminates an enumeration
     unexpectedly, the data source SHOULD send an EnumerationEnd SOAP
     message to the endpoint reference indicated when the enumeration
     was created (see <specref ref="Enumerate"/>). The message MUST be of the
     following form:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/2009/02/ws-enu/EnumerationEnd

<kw>[Body]</kw>
  &lt;wsen:EnumerationEnd ...>
    &lt;wsen:Code>
      ( http://www.w3.org/2009/02/ws-enu/SourceShuttingDown
      | http://www.w3.org/2009/02/ws-enu/SourceCancelling )
    &lt;/wsen:Code&gt;
    &lt;wsen:Reason xml:lang="<emph>language identifier</emph>" >
      <emph>xs:string</emph>
    &lt;/wsen:Reason> ?
    <emph>xs:any</emph>*
  &lt;/wsen:EnumerationEnd></eg>
    </example>

    <p>
     The following describes additional, normative
     constraints on the outline listed above:
    </p>

    <glist>
     <gitem>
      <label>
       <kw>[Body]</kw>/wsen:EnumerationEnd/wsen:Code =
       "http://www.w3.org/2009/02/ws-enu/SourceShuttingDown"
      </label>
      <def>
       <p>
        This value MUST be used if the data source
        terminated the enumeration because the source is being shut down in
        a controlled manner; that is, if the data source is being shut down
        but has the opportunity to send an EnumerationEnd message before it
        exits.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> 
       <kw>[Body]</kw>/wsen:EnumerationEnd/wsen:Code =
       "http://www.w3.org/2009/02/ws-enu/SourceCancelling"
      </label>
      <def>
       <p>
        This value MUST be used if the data source
        terminated the enumeration for some other reason before it
        expired.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/wsen:EnumerationEnd/wsen:Reason </label>
      <def>
       <p>
        This optional element contains text, in the
        language specified by the @xml:lang attribute, describing the
        reason for the unexpected enumeration termination.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     Other components of the outline above are not
     further constrained by this specification.
    </p>

   </div2>
  </div1>

  <div1 id="Faults">
   <head>Faults</head>
 
   <p>
    WS-Enumeration faults MUST include as the <kw>[Action]</kw> property
    the following fault action URI:
   </p>
   
   <example>
    <eg>http://www.w3.org/2009/02/ws-enu/fault</eg>
   </example>
   
   <p>
    The faults defined in this section are generated if the condition
    stated in the preamble is met. Faults are targeted at a
    destination endpoint according to the fault handling rules defined
    in <bibref ref="AddrCore"/>.
   </p>
   
   <p>
    The definitions of faults in this section use the following properties:
   </p>
   
   <p>
    <kw>[Code]</kw> The fault code.<phrase/>
    <kw>[Subcode]</kw> The fault subcode.<phrase/>
    <kw>[Reason]</kw> The English language reason element.<phrase/>
    <kw>[Detail]</kw> The detail element. If absent, no detail element 
    is defined for the fault.<phrase/>
   </p>
   
   <p>
    For SOAP 1.2, the <kw>[Code]</kw> property MUST be either
    "Sender" or "Receiver". These properties are serialized
    into text XML as follows:
   </p>
   
   <table id="soapver" border="1">
    <tbody>
     <tr>
      <th> SOAP Version </th>
      <th> Sender </th>
      <th> Receiver </th>
     </tr>
     <tr>
      <td> SOAP 1.2 </td>
      <td> s12:Sender </td>
      <td> s12:Receiver </td>
     </tr>
    </tbody>
   </table>
   
   <p>The properties above bind to a SOAP 1.2 fault as follows:</p>
   <example>
    <eg>&lt;s12:Envelope&gt;
  &lt;s12:Header&gt;
    &lt;wsa:Action&gt;
      http://www.w3.org/2009/02/ws-enu/fault
    &lt;/wsa:Action&gt;
    &lt;!-- Headers elided for clarity. --&gt;
  &lt;/s12:Header&gt;
  &lt;s12:Body&gt;
    &lt;s12:Fault&gt;
      &lt;s12:Code&gt;
        &lt;s12:Value&gt;<kw>[Code]</kw>&lt;/s12:Value&gt;
        &lt;s12:Subcode&gt;
          &lt;s12:Value&gt;<kw>[Subcode]</kw>&lt;/s12:Value&gt;
        &lt;/s12:Subcode&gt;
      &lt;/s12:Code&gt;
      &lt;s12:Reason&gt;
        &lt;s12:Text xml:lang="en"&gt;<kw>[Reason]</kw>&lt;/s12:Text&gt;
      &lt;/s12:Reason&gt;
      &lt;s12:Detail&gt;
        <kw>[Detail]</kw>
        ...
      &lt;/s12:Detail&gt;
    &lt;/s12:Fault&gt;
  &lt;/s12:Body&gt;
&lt;/s12:Envelope&gt;</eg>
   </example>
   
   <p>The properties bind to a SOAP 1.1 fault as follows:</p>
   <example>
    <eg>&lt;s11:Envelope&gt;
  &lt;s11:Body&gt;
    &lt;s11:Fault&gt;
      &lt;faultcode&gt;<kw>[Subcode]</kw>&lt;/faultcode&gt;
      &lt;faultstring xml:lang="en"&gt;<kw>[Reason]</kw>&lt;/faultstring&gt;
      &lt;detail&gt;
        <kw>[Detail]</kw>
        ...
      &lt;/detail&gt;
    &lt;/s11:Fault&gt;
  &lt;/s11:Body&gt;
&lt;/s11:Envelope&gt;</eg>
   </example>

   <div2 id="InvalidExpirationTime">
    <head>InvalidExpirationTime</head>

    <p>
     This fault is generated if the Enumerate expiration time is either a 
     zero duration or a specific time that occurs in the past according to 
     the data source.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Sender </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:InvalidExpirationTime </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        Invalid expiration time.
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="UnsupportedExpirationTime">
    <head>UnsupportedExpirationTime</head>

    <p>
     This fault is generated if the Enumerate expiration time is 
     specified not as a duration.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Sender </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:UnsupportedExpirationTime </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        Unsupported expiration time.
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="FilteringNotSupported">
    <head>FilteringNotSupported</head>

    <p>
     This fault is generated if the data source does not support
     filters.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Sender </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:FilteringNotSupported </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        Filtering not supported.
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="FilterDialectRequestedUnavailable">
    <head>FilterDialectRequestedUnavailable</head>

    <p>
     This fault is generated if the data source does not support
     the requested filter dialect.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Sender </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:FilterDialectRequestedUnavailable </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        Filer dialect requested unavailable.
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td>
        &lt;wsen:SupportedDialect&gt; +
        <phrase/>
        <emph>Optional; repeating; one per filter dialect supported by the
        receiver</emph>
       </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="CannotProcessFilter">
    <head>CannotProcessFilter</head>

    <p>
     This fault is generated if the data source can not process the
     filter content.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Sender </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:CannotProcessFilter </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        Cannot filter as requested.
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="InvalidEnumerationContext">
    <head>InvalidEnumerationContext</head>

    <p>
     This fault is generated if the enumeration context is invalid.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Receiver </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:InvalidEnumerationContext </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td>
        <emph>
         Text explaining why the enumeration context is no longer valid, or 
        </emph>
        "Invalid enumeration context" 
        <emph>
         if no additional information is available.
        </emph>
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="TimedOut">
    <head>TimedOut</head>

    <p>
     This fault is generated if the data source times out is the
     wsen:MaxTime is reached.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Receiver </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:TimedOut </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td> Timeout. </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="UnableToRenew">
    <head>UnableToRenew</head>

    <p>
     This fault is generated if the data source is unable to
     renew the enumeration.
    </p>

    <table border="1">
     <tbody>
      <tr>
       <td> <kw>[Code]</kw> </td>
       <td> s12:Receiver </td>
      </tr>
      <tr>
       <td> <kw>[Subcode]</kw> </td>
       <td> wsen:UnableToRenew </td>
      </tr>
      <tr>
       <td> <kw>[Reason]</kw> </td>
       <td> 
        <emph>
         Text explaining why the enumeration context cannot be renewed, or 
        </emph>
        "data source unable to renew"
        <emph>
         if no additional information is available.
        </emph>
       </td>
      </tr>
      <tr>
       <td> <kw>[Detail]</kw> </td>
       <td> </td>
      </tr>
     </tbody>
    </table>
   </div2>

   <div2 id="UnusableEPR">
    <head>UnusableEPR</head>
   
    <p>
     This fault MAY be generated when a Data Source detects
     that the wsen:EndTo EPR is unusable.
    </p>
   
    <table border="1">
     <tbody>
      <tr>
       <td><kw>[Code]</kw></td>
       <td>s12:Sender</td>
      </tr>
   
      <tr>
       <td><kw>[Subcode]</kw></td>
       <td>wsen:UnusableEPR</td>
      </tr>
   
      <tr>
       <td><kw>[Reason]</kw></td>
       <td>The wsen:EndTo EPR is unusable.</td>
      </tr>
   
      <tr>
       <td><kw>[Detail]</kw></td>
       <td>
        <emph> Details as to why the EPR is unusable. </emph>
       </td>
      </tr>
     </tbody>
    </table>
   </div2>
   
  </div1>

  <div1 id="Security">
   <head>Security Considerations</head>

   <p>
    It is strongly recommended that the
    communication between services be secured using the mechanisms
    described in <bibref ref="WSSecurity"/>. 
   </p>
   <p>
    In order to properly secure messages, the body
    (even if empty) and all relevant headers need to be included in the
    signature. Specifically, the WS-Addressing header
    blocks, WS-Security timestamp, and any header blocks resulting from
    a <code>&lt;wsa:ReferenceParameters&gt;</code>
    in references need to be signed along with the body in order to
    "bind" them together and prevent certain types of attacks.
   </p>
   <p>
    If a requestor is issuing multiple messages to a
    Web service, such as when a consumer is enumerating a data source,
    it is recommended that a security context be established using the
    mechanisms described in <bibref ref="WSSecureConversation"/>. It is often
    appropriate to establish a security context that is used both for
    the initiation of enumeration (i.e., the Enumerate request or an
    equivalent service-specific request) and the actual enumeration
    itself (i.e., the Pull requests). It is further recommended that if
    shared secrets are used, message-specific derived keys should be
    used to protect the secret from crypto attacks.
   </p>
   <p>
    The access control semantics of data sources is
    out-of-scope of this specification and are specific to each data
    source. Similarly, any protection mechanisms on data
    source independent of their transfer (e.g. embedded signatures and
    encryption) are also out-of-scope.
   </p>
   <p>
    It is recommended that the security
    considerations of WS-Security also be considered.
   </p>
   <p>
    While a comprehensive set of attacks is not
    feasible, the following list summarizes common classes of attacks
    that apply to this protocol and identifies the mechanism(s) to
    prevent/mitigate the attacks. 
   </p>

   <ulist>
    <item>
     <p>
      <emph>Replay</emph>
      - Messages, or portions
      of messages, can be replayed in an attempt to gain access or
      disrupt services. Freshness checks such as timestamps,
      digests, and sequences can be used to detect duplicate
      messages.
     </p>
    </item>

    <item>
     <p>
      <emph>Invalid tokens</emph> 
      - There are a number of token attacks including certificate 
      authorities, false signatures, and PKI attacks. Care should be taken
      to ensure each token is valid (usage window, digest, signing
      authority, revocation, ...), and that the appropriate delegation
      policies are in compliance.
     </p>
    </item>

    <item>
     <p>
      <emph>Man-in-the-middle</emph>
      - The message exchanges in this
      specification could be subject to man-in-the-middle attacks so care
      should be taken to reduce possibilities here such as establishing a
      secure channel and verifying that the security tokens user
      represent identities authorized to speak for, or on behalf of, the
      desired resource reference.
     </p>
    </item>

    <item>
     <p>
      <emph>Message alteration</emph> 
      - Alteration is prevented by
      including signatures of the message information using WS-Security.
      Care should be taken to review message part references
      to ensure they haven't been forged (e.g. ID duplication).
     </p>
    </item>

    <item>
     <p>
      <emph>Message disclosure</emph> 
      - Confidentiality is preserved
      by encrypting sensitive data using WS-Security.
     </p>
    </item>

    <item>
     <p>
      <emph>Key integrity</emph> 
      - Key integrity is maintained
      by using the strongest algorithms possible (by comparing secured
      policies - see <bibref ref="wspolicy"/> and
      <bibref ref="WSSecurityPolicy"/>) and by using derived
      keys (<bibref ref="WSSecureConversation"/>).
     </p>
    </item>

    <item>
     <p>
      <emph>Authentication</emph> 
      - Authentication is
      established using the mechanisms described in WS-Security and
      WS-Trust. Each message is authenticated using the
      mechanisms described in WS-Security.
     </p>
    </item>

    <item>
     <p>
      <emph>Accountability</emph> 
      - Accountability is
      a function of the type of and string of the key and algorithms
      being used. In many cases, a strong symmetric key
      provides sufficient accountability. However, in some
      environments, strong PKI signatures are required.
     </p>
    </item>

    <item>
     <p>
      <emph>Availability</emph> 
      - All reliable
      messaging services are subject to a variety of availability
      attacks. Replay detection is a common attack and it is
      recommended that this be addressed by the mechanisms described in
      WS-Security. Other attacks, such as network-level
      denial of service attacks are harder to avoid and are outside the
      scope of this specification. That said, care should be
      taken to ensure that minimal state is saved prior to any
      authenticating sequences.
     </p>
    </item>
   </ulist>
  </div1>

  <div1 id="acks">
   <head>Acknowledgements</head>

   <p>
    This specification has been developed as a
    result of joint work with many individuals and teams,
    including: 
      Ashok Malhotra (Oracle Corp.),
      Asir Vedamuthu (Microsoft Corp.),
      Bob Freund (Hitachi, Ltd.),
      Doug Davis (IBM),
      Fred Maciel (Hitachi, Ltd.),
      Geoff Bullen (Microsoft Corp.),
      Gilbert Pilz (Oracle Corp.),
      Greg Carpenter (Microsoft Corp.),
      Jeff Mischkinsky (Oracle Corp.),
      Katy Warr (IBM),
      Li Li (Avaya Communications),
      Mark Little (Red Hat),
      Prasad Yendluri (Software AG),
      Sreedhara Narayanaswamy (CA),
      Sumeet Vij (Software AG),
      Vikas Varma (Software AG),
      Wu Chou (Avaya Communications),
      Yves Lafon (W3C)
   </p>
  </div1>

  <div1 id="refs">
   <head>References</head>

   <blist>
    <bibl key="RFC2119" id="RFC2119"
     href="http://www.ietf.org/rfc/rfc2119.txt">
      <titleref>
       Key words for use in RFCs to Indicate Requirement Levels
      </titleref>
      , S. Bradner, March 1997.
    </bibl>

    <bibl key="SOAP11" id="SOAP11"
     href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/">
      <titleref>
       Simple Object Access Protocol (SOAP) 1.1
      </titleref>
      , D. Box, et al, May 2000.
    </bibl>

    <bibl key="SOAP12" id="SOAP121"
     href="http://www.w3.org/TR/2003/REC-soap12-part1-20030624/">
      <titleref>
       SOAP Version 1.2 Part 1: Messaging Framework
      </titleref>
      , M. Gudgin, et al, June 2003.
    </bibl>

    <bibl key="WS-Addressing" id="AddrCore"
     href="http://www.w3.org/2005/08/addressing/">
      <titleref>
       W3C Recommendation, "Web Services Addressing 1.0 (WS-Addressing)"
      </titleref>
      , May 2006.
    </bibl>

    <bibl key="WS-Policy" id="wspolicy"
     href="http://www.w3.org/TR/ws-policy/">
      <titleref>
       W3C Recommendation, "Web Services Policy 1.5 - Framework"
      </titleref>
      , September 2007.
    </bibl>

    <bibl key="WS-SecureConversation" id="WSSecureConversation"
     href="http://schemas.xmlsoap.org/ws/2005/02/sc">
      <titleref>
       Web Services Secure Conversation Language (WS-SecureConversation)
      </titleref>
      , S. Anderson, et al, February 2005.
    </bibl>

    <bibl key="WS-Security" id="WSSecurity"
     href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf">
      <titleref>
       Web Services Security: SOAP Message Security 1.0
      </titleref>
      , A. Nadalin, et al, March 2004.
    </bibl>

    <bibl key="WS-SecurityPolicy" id="WSSecurityPolicy"
     href="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
      <titleref>
       Web Services Security Policy Language (WS-SecurityPolicy), , Version 1.1
      </titleref>
      , G. Della-Libera, et al, July 2005.
    </bibl>

    <bibl key="WSDL11" id="WSDL11" 
     href="http://www.w3.org/TR/2001/NOTE-wsdl-20010315">
      <titleref>
       Web Services Description Language (WSDL) 1.1
      </titleref>
      , E. Christensen, et al, March 2001.
    </bibl>

    <bibl key="XML Infoset" id="XMLInfoset"
     href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/">
      <titleref>
       XML Information Set
      </titleref>
      , J. Cowan, et al, February 2004.
    </bibl>
    
    <bibl key="XMLSchema - Part 1" id="XMLSchema1"
     href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/">
      <titleref>
       XML Schema Part 1: Structures
      </titleref>
      , H. Thompson, et al, October 2004.
    </bibl>

    <bibl key="XMLSchema - Part 2" id="XMLSchema2" 
     href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">
      <titleref>
       XML Schema Part 2: Datatypes
      </titleref>
      , P. Biron, et al, October 2004.
    </bibl>

    <bibl key="XPath1.0" id="XPath1"
     href="http://www.w3.org/TR/1999/REC-xpath-19991116">
      <titleref>
       XML Path Language (XPath) Version 1.0
      </titleref>
      , J. Clark, et al, November 1999.
    </bibl>
   </blist>

  </div1>
 </body>

 <back>
  <div1 id="schema">
   <head>XML Schema</head>

   <p>
    A normative copy of the XML Schema <bibref ref='XMLSchema1'/>,
    <bibref ref='XMLSchema2'/> description for this specification may be
    retrieved from the following address:
   </p>

   <example>
    <eg><loc href='http://www.w3.org/2009/02/ws-enu/enumeration.xsd'>http://www.w3.org/2009/02/ws-enu/enumeration.xsd</loc></eg>
   </example>

   <p>
    A non-normative copy of the XML schema is listed below for convenience.
   </p>

   <example>
    <eg>&lt;xs:schema
    targetNamespace="http://www.w3.org/2009/02/ws-enu"
    xmlns:tns="http://www.w3.org/2009/02/ws-enu"
    xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    blockDefault="#all">

  &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
     schemaLocation="http://www.w3.org/2001/xml.xsd" />
  &lt;xs:import
    namespace="http://www.w3.org/2005/08/addressing"
    schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd" />

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

  &lt;xs:simpleType name="PositiveDurationType">
    &lt;xs:restriction base="xs:duration">
      &lt;xs:minExclusive value="P0Y0M0DT0H0M0S" />
    &lt;/xs:restriction>
  &lt;/xs:simpleType>

  &lt;xs:simpleType name="NonNegativeDurationType">
    &lt;xs:restriction base="xs:duration">
      &lt;xs:minInclusive value="P0Y0M0DT0H0M0S" />
    &lt;/xs:restriction>
  &lt;/xs:simpleType>

  &lt;xs:simpleType name="ExpirationType">
    &lt;xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType" />
  &lt;/xs:simpleType>

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

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

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

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

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

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

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

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

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

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

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

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

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

  &lt;!-- Release response -->
  &lt;xs:element name="ReleaseResponse">
    &lt;xs:complexType>
      &lt;xs:sequence>
        &lt;xs:any namespace="##other" processContents="lax"
                minOccurs="0" maxOccurs="unbounded" />
      &lt;/xs:sequence>
      &lt;xs:anyAttribute namespace="##other" processContents="lax" />
    &lt;/xs:complexType>
  &lt;/xs:element>

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

  &lt;xs:simpleType name="EnumerationEndCodeType">
    &lt;xs:restriction base="xs:anyURI">
    &lt;xs:enumeration value=
      "http://www.w3.org/2009/02/ws-enu/SourceShuttingDown" />
    &lt;xs:enumeration value=
      "http://www.w3.org/2009/02/ws-enu/SourceCancelling" />
    &lt;/xs:restriction>
  &lt;/xs:simpleType>

  &lt;xs:simpleType name="OpenEnumerationEndCodeType">
    &lt;xs:union memberTypes="tns:EnumerationEndCodeType xs:anyURI" />
  &lt;/xs:simpleType>
&lt;/xs:schema&gt;</eg>
   </example>
  </div1>

  <div1 id="WSDL">
   <head>WSDL</head>

   <p>
    A normative copy of the WSDL <bibref ref="WSDL11"/>
    description for this specification may be retrieved from the
    following address:
   </p>

   <example>
    <eg><loc href="http://www.w3.org/2009/02/ws-enu/enumeration.wsdl">http://www.w3.org/2009/02/ws-enu/enumeration.wsdl</loc></eg>
   </example>

   <p>
    A non-normative copy of the WSDL description is
    listed below for convenience.
   </p>

   <example>
    <eg>&lt;wsdl:definitions
    targetNamespace="http://www.w3.org/2009/02/ws-enu" 
    xmlns:wsa="http://www.w3.org/2005/08/addressing" 
    xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:wsen="http://www.w3.org/2009/02/ws-enu"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" >

  &lt;wsdl:types>
    &lt;xs:schema>
      &lt;xs:import
        namespace="http://www.w3.org/2009/02/ws-enu"
        schemaLocation="http://www.w3.org/2009/02/ws-enu/enumeration.xsd" />
    &lt;/xs:schema>
  &lt;/wsdl:types>

  &lt;wsdl:message name="EnumerateMessage">
    &lt;wsdl:part name="Body" element="wsen:Enumerate" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="EnumerateResponseMessage">
    &lt;wsdl:part name="Body" element="wsen:EnumerateResponse" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="PullMessage">
    &lt;wsdl:part name="Body" element="wsen:Pull" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="PullResponseMessage">
    &lt;wsdl:part name="Body" element="wsen:PullResponse" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="RenewMessage" >
    &lt;wsdl:part name="Body" element="wsen:Renew" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="RenewResponseMessage" >
    &lt;wsdl:part name="Body" element="wsen:RenewResponse" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="GetStatusMessage" >
    &lt;wsdl:part name="Body" element="wsen:GetStatus" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="GetStatusResponseMessage" >
    &lt;wsdl:part name="Body" element="wsen:GetStatusResponse" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="ReleaseMessage">
    &lt;wsdl:part name="Body" element="wsen:Release" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="ReleaseResponseMessage">
    &lt;wsdl:part name="Body" element="wsen:ReleaseResponse" />
  &lt;/wsdl:message>
  &lt;wsdl:message name="EnumerationEndMessage" >
    &lt;wsdl:part name="Body" element="wsen:EnumerationEnd" />
  &lt;/wsdl:message>
  
  &lt;wsdl:portType name="DataSource">
    &lt;wsdl:operation name="EnumerateOp">
      &lt;wsdl:input 
        message="wsen:EnumerateMessage"
        wsam:Action="http://www.w3.org/2009/02/ws-enu/Enumerate" />
      &lt;wsdl:output 
        message="wsen:EnumerateResponseMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/EnumerateResponse" />
    &lt;/wsdl:operation>
    &lt;wsdl:operation name="PullOp">
      &lt;wsdl:input 
        message="wsen:PullMessage"
        wsam:Action="http://www.w3.org/2009/02/ws-enu/Pull" />
      &lt;wsdl:output 
        message="wsen:PullResponseMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/PullResponse" />
    &lt;/wsdl:operation>
    &lt;wsdl:operation name="RenewOp" >
      &lt;wsdl:input 
        message="wsen:RenewMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/Renew" />
      &lt;wsdl:output 
        message="wsen:RenewResponseMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/RenewResponse" />
    &lt;/wsdl:operation>
    &lt;wsdl:operation name="GetStatusOp" >
      &lt;wsdl:input 
        message="wsen:GetStatusMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/GetStatus" />
      &lt;wsdl:output 
        message="wsen:GetStatusResponseMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/GetStatusResponse" />
    &lt;/wsdl:operation>
    &lt;wsdl:operation name="ReleaseOp">
      &lt;wsdl:input 
        message="wsen:ReleaseMessage"
        wsam:Action="http://www.w3.org/2009/02/ws-enu/Release" />
      &lt;wsdl:output 
        message="wsen:ReleaseResponseMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/ReleaseResponse" />
    &lt;/wsdl:operation>
  &lt;/wsdl:portType>

  &lt;wsdl:portType name="EnumerationEndPortType">
    &lt;wsdl:operation name="EnumerationEndOp" >
      &lt;wsdl:input 
        message="wsen:EnumerationEndMessage" 
        wsam:Action="http://www.w3.org/2009/02/ws-enu/EnumerationEnd" />
    &lt;/wsdl:operation>
  &lt;/wsdl:portType>

&lt;/wsdl:definitions&gt;</eg>
   </example>
  </div1>

  <div1 id="changelog">
   <head>Change Log</head>

   <table border="1">
    <tbody>
     <tr>
      <th> Data </th>
      <th> Author </th>
      <th> Description </th>
     </tr>
     <tr>
      <td> 2009/03/04 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6391">6391</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/04 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6519">6519</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/11 </td>
      <td> DD </td>
      <td> Added change log </td>
     </tr>
     <tr>
      <td> 2009/03/11 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6641">6641</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/11 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6425">6425</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/16 </td>
      <td> KW </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6587">6587</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/17 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6399">6399</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/23 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6666">6666</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/24 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6648">6648</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/04/07 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6499">6499</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/04/07 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6726">6726</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/04/22 </td>
      <td> KW </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6739">6739</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/04/28 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6787">6787</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/05/12 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6860">6860</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/05/13 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6696">6696</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/05/21 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6674">6674</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/05/26 </td>
      <td> KW </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6920">6920</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/05/27 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6906">6906</loc>
      </td>
     </tr>
    </tbody>
   </table>
  </div1>

 </back>

</spec>

