<?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 "&wsmex.status;" >
<!ENTITY short-status "&wsmex.short-status;" >
 ]>

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

  <publoc>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
         xlink:show="replace" xlink:actuate="onRequest"
         href="&wsmex.dated;">&wsmex.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/&wsmex.shortname;">http://www.w3.org/TR/&wsmex.shortname;
   </loc>
  </latestloc>

  <prevlocs>
   <loc xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
         xlink:show="replace" xlink:actuate="onRequest"
         href="&prev.wsmex.dated;">&prev.wsmex.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 can 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 defines how metadata
    associated with a Web service endpoint can be represented as
    <bibref ref='WS-Transfer'/> resources, how metadata can
    be embedded in <bibref ref='AddrCore'/>
    endpoint references, and how metadata could be
    retrieved from a Web service endpoint.
   </p>
  </abstract>
  
  <langusage>
   <language id="en">English</language>
  </langusage>

  <revisiondesc>
   <p>Last Modified: $Date: 2009/10/27 17:25:18 $</p>
  </revisiondesc>

 </header>

 <body>
  <div1 id="Composable">
   <head>Composable Architecture</head>

   <p>
    The Web services specifications (WS-*) are designed to be composed with 
    each other to provide a rich set of tools for the Web services 
    environment. This specification specifically relies on other Web 
    services specifications to provide secure, reliable, and/or transacted 
    message delivery and to express Web service metadata.
   </p>
  </div1>

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

   <p>
    Web services use metadata to describe what other endpoints need to know 
    to interact with them. Specifically, <bibref ref='wspolicy'/> 
    describes the capabilities, requirements, and general characteristics 
    of Web services; <bibref ref='WSDL11'/> describes abstract message 
    operations, concrete network protocols, and endpoint addresses used 
    by Web services; XML Schema <bibref ref='XMLSchema1'/>, 
    <bibref ref='XMLSchema2'/> describes the structure and contents of 
    XML-based messages received by and sent by Web services.
   </p>

   <p>
    To bootstrap communication with Web services this specification defines 
    how metadata can be treated as <bibref ref='WS-Transfer'/> resources 
    for retrieval purposes, how metadata can be embedded in Web service 
    endpoint references, and how Web service endpoints can OPTIONALLY 
    support a request-response interaction for the retrieval of metadata.
    When the type of metadata sought is clearly known, e.g., 
    <bibref ref='wspolicy'/>, a requester MAY indicate that only that 
    type is to be returned; where additional types of metadata are being 
    used, or are expected, or when a requester needs to retrieve all of 
    the metadata relevant to subsequent interactions with an endpoint, a 
    requester MAY indicate that all available metadata, regardless of their 
    types, are expected.
   </p>

   <p>
    The mechanisms defined herein are intended for the retrieval of 
    metadata (i.e., Web service description information) only. They are 
    not intended to provide a general purpose query or retrieval 
    mechanism for other types of data associated with a Web service, 
    such as state data, properties and attribute values, etc.
   </p>

   <div2 id='Requirements'>
    <head>Requirements</head>

    <p>
     This specification intends to meet the following requirements:
    </p>

    <ulist>
     <item>
      <p>
       Define an encapsulation format for metadata.
      </p>
     </item>

     <item>
      <p>
       Treat the metadata about a Web service endpoint as 
       <bibref ref='WS-Transfer'/> resources.
      </p>
     </item>

     <item>
      <p>
       Define an OPTIONAL bootstrap mechanism for metadata-driven 
       <bibref ref='XMLSchema1'/>, <bibref ref='WSDL11'/>, 
       <bibref ref='wspolicy'/> message exchange.
      </p>
     </item>
     
     <item>
      <p>
       Support future versions of known metadata formats.
      </p>
     </item>

     <item>
      <p>
       Allow new metadata formats to be added.
      </p>
     </item>

     <item>
      <p>
       Leverage other Web service specifications for secure, reliable, 
       transacted message delivery.
      </p>
     </item>

     <item>
      <p>
       Support both <bibref ref='SOAP11'/> and <bibref ref='SOAP121'/> 
       Envelopes.
      </p>
     </item>

     <item>
      <p>
       Enable description in <bibref ref='WSDL11'/> of the OPTIONAL 
       request-response interaction.
      </p>
     </item>
    </ulist>
   </div2>
   
   <div2 id='Example'>
    <head>Example</head>

    <p>
     <specref ref="GetRequest"/> illustrates a sample 
     <bibref ref='WS-Transfer'/> Get request for a resource'
     s representation.
    </p>

    <example id="GetRequest">
     <head>Sample Get request message</head>

     <eg>(01)  &lt;s11:Envelope
(02)     xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'
(03)     xmlns:wsa='http://www.w3.org/2005/08/addressing'>
(04)    &lt;s11:Header>
(05)      &lt;wsa:Action>
(06)        http://www.w3.org/&wsmex.nsprefix;/ws-tra/Get
(07)      &lt;/wsa:Action>
(08)      &lt;wsa:To>http://services.example.org/stockquote/metadata&lt;/wsa:To>
(09)      &lt;wsa:ReplyTo>
(10)        &lt;wsa:Address>http://client.example.org&lt;/wsa:Address>
(11)      &lt;/wsa:ReplyTo>
(12)      &lt;wsa:MessageID>
(13)        urn:uuid:1cec121a-82fe-41da-87e1-3b23f254f128
(14)      &lt;/wsa:MessageID>
(15)    &lt;/s11:Header>
(16)    &lt;s11:Body />
(17)  &lt;/s11:Envelope&gt;</eg>
    </example>

    <p>
     The sample request message of <specref ref="GetRequest"/> is a 
     <bibref ref='WS-Transfer'/> request for the retrieval of a 
     resource's representation. In this case, the requested representation 
     is the WS-Metadata Exchange Metadata element about a Web service 
     endpoint. The fact that the resource's representation is a 
     mex:Metadata element might be known to the requestor but is not 
     explicitly encoded in the request message.
    </p>

    <p>
     <specref ref="GetResponse"/> illustrates a sample response to the 
     request of <specref ref="GetRequest"/>.
    </p>

    <example id="GetResponse">
     <head>Sample response message with metadata</head>

     <eg>(01)  &lt;s11:Envelope
(02)      xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'
(03)      xmlns:wsa='http://www.w3.org/2005/08/addressing'
(04)      xmlns:mex='http://www.w3.org/&wsmex.nsprefix;/ws-mex'
(05)      xmlns:wsp='http://www.w3.org/ns/ws-policy'
(06)      xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'>
(07)    &lt;s11:Header>
(08)      &lt;wsa:Action>
(09)        http://www.w3.org/&wsmex.nsprefix;/ws-tra/GetResponse
(10)      &lt;/wsa:Action>
(11)      &lt;wsa:To>http://client.example.org&lt;/wsa:To>
(12)      &lt;wsa:RelatesTo>
(13)        urn:uuid:1cec121a-82fe-41da-87e1-3b23f254f128
(14)      &lt;/wsa:RelatesTo>
(15)    &lt;/s11:Header>
(16)    &lt;s11:Body>
(17)      &lt;mex:Metadata>
(18)        &lt;mex:MetadataSection Dialect='http://schemas.xmlsoap.org/wsdl/'>
(19)          &lt;wsdl:definitions
(20)              name='StockQuote'
(21)              targetNamespace='http://services.example.org/stockquote'
(22)              xmlns:tns='http://services.example.org/stockquote'
(23)              xmlns:msgs='http://services.example.org/stockquote/schemas'
(24)              xmlns:wsoap='http://schemas.xmlsoap.org/wsdl/soap/'
(25)              xmlns:xs='http://www.w3.org/2001/XMLSchema'>
(26)            &lt;wsdl:import
(27)                namespace='http://services.example.org/stockquote'
(28)                location='http://services.example.org/stockquote/schemas' />
(29)            &lt;wsdl:portType name='StockQuotePortType'>
(30)              &lt;wsdl:operation name='GetLastTradePrice'>
(31)                &lt;wsdl:input message='msgs:GetLastTradePriceInput'
(32)                            name='GetLastTradePriceInput'/>
(33)                &lt;wsdl:output message='msgs:GetLastTradePriceOutput'
(34)                             name='GetLastTradePriceOutput'/>
(35)              &lt;/wsdl:operation>
(36)            &lt;/wsdl:portType>
(37)            &lt;wsdl:binding name='StockQuoteBinding'
(38)                  type='tns:StockQuotePortType'>
(39)              &lt;wsp:PolicyReference
(40)                  URI='http://services.example.org/stockquote/policy' />
(41)              &lt;wsoap:binding style='document'
(42)                  transport='http://schemas.xmlsoap.org/soap/http'/>
(43)              &lt;wsdl:operation name='GetLastTradePrice'>
(44)                &lt;wsoap:operation soapAction='http://services.example.org/stockquote/GetLastTradePrice' />
(45)                &lt;wsdl:input name='GetLastTradePriceInput'>
(46)                  &lt;wsoap:body use='literal'/>
(47)                &lt;/wsdl:input>
(48)                &lt;wsdl:output name='GetLastTradePriceOutput'>
(49)                  &lt;wsoap:body use='literal'/>
(50)                &lt;/wsdl:output>
(51)              &lt;/wsdl:operation>
(52)            &lt;/wsdl:binding>
(53)            &lt;wsdl:service name='StockQuoteService'>
(54)              &lt;wsdl:port name='StockQuotePort'
(55)                         binding='tns:StockQuoteBinding' >
(56)                &lt;wsoap:address
(57)                    location='http://services.example.org/stockquote' />
(58)              &lt;/wsdl:port>
(59)            &lt;/wsdl:service>
(60)          &lt;/wsdl:definitions>
(61)        &lt;/mex:MetadataSection>
(62)        &lt;mex:MetadataSection
(63)            Dialect='http://www.w3.org/2001/XMLSchema'
(64)            Identifier='http://services.example.org/stockquote/schemas'>
(65)          &lt;mex:Location>
(66)            http://services.example.org/stockquote/schemas
(67)          &lt;/mex:Location>
(68)        &lt;/mex:MetadataSection>
(69)        &lt;mex:MetadataSection
(70)            Dialect='http://www.w3.org/ns/ws-policy'
(71)            Identifier='http://services.example.org/stockquote/policy'>
(72)          &lt;mex:MetadataReference>
(73)            &lt;wsa:Address>
(74)              http://services.example.org/stockquote/policy
(75)            &lt;/wsa:Address>
(76)          &lt;/mex:MetadataReference>
(77)        &lt;/mex:MetadataSection>
(78)      &lt;/mex:Metadata>
(79)    &lt;/s11:Body>
(80)  &lt;/s11:Envelope&gt;</eg>
    </example>

    <p>
     The message of <specref ref="GetResponse"/> is a <bibref ref ='WS-Transfer'/> 
     response message to the request of <specref ref="GetRequest"/>. The content 
     of the <kw>[Body]</kw> (lines 16-79) is a mex:Metadata element with 
     metadata 
     about the Web service endpoint (lines 17-78). The mex:Metadata 
     contains three Metadata Sections. The first Metadata Section 
     (lines 18-61) contains the <bibref ref ='WSDL11'/> of the Web 
     service endpoint. The second Metadata Section (lines 62-68) contains 
     the location of the XML Schemas <bibref ref ='XMLSchema1'/>,
     <bibref ref ='XMLSchema2'/> used by the WSDL document. The schemas can 
     be retrieved through an HTTP GET request at the identified URL 
     (lines 65-67). The third Metadata Section (lines 69-77) contains 
     the <bibref ref ='AddrCore'/> endpoint reference (lines 72-75) of 
     a <bibref ref ='WS-Transfer'/> resource the representation of 
     which is a <bibref ref ='wspolicy'/> document as indicated by 
     the Dialect attribute (line 70). The WS-Policy document is the 
     same as the one indicated in the WSDL document (lines 39-40).
    </p>

    <p>
     While the WS-Policy of the Web service endpoint could be retrieved using 
     a WS-Transfer GET request directed to the endpoint identified by the 
     mex:MetadataReference element in lines 72-76 of 
     <specref ref="GetResponse"/>,
     some endpoints MAY choose to support explicit request for metadata. 
     <specref ref="GetMexReq"/> illustrates a sample GetMetadata request 
     for the <bibref ref ='wspolicy'/>.
    </p>

    <example id="GetMexReq">
     <head>Sample GetMetadata request message</head>

     <eg>(01)  &lt;s11:Envelope
(02)      xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'
(03)      xmlns:wsa='http://www.w3.org/2005/08/addressing'
(04)      xmlns:mex='http://www.w3.org/&wsmex.nsprefix;/ws-mex' >
(05)    &lt;s11:Header>
(06)      &lt;wsa:To>http://services.example.org/stockquote&lt;/wsa:To>
(07)      &lt;wsa:Action>
(08)        http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadata
(09)      &lt;/wsa:Action>
(10)      &lt;wsa:MessageID>
(11)        urn:uuid:73d7edfc-5c3c-49b9-ba46-2480caee43e9
(12)      &lt;/wsa:MessageID>
(13)      &lt;wsa:ReplyTo>
(14)        &lt;wsa:Address>http://client.example.org&lt;/wsa:Address>
(15)      &lt;/wsa:ReplyTo>
(16)    &lt;/s11:Header>
(17)    &lt;s11:Body>
(18)      &lt;mex:GetMetadata>
(19)        &lt;mex:Dialect URI="http://www.w3.org/ns/ws-policy"
(20)          Identifier="http://services.example.org/stockquote/policy"/>
(21)      &lt;/mex:GetMetadata>
(22)    &lt;/s11:Body>
(23)  &lt;/s11:Envelope&gt;</eg>
    </example>

    <p>
     Lines 7-9 in <specref ref="GetMexReq"/> indicate this is a GetMetadata 
     request. As lines 18-21 indicate, this request is for the policy of 
     the Web service endpoint (line 6).
    </p>

    <p>
     <specref ref="GetMexRes"/> lists a sample response to the request in 
     <specref ref="GetMexReq"/>.
    </p>

    <example id="GetMexRes">
     <head>Sample GetMetadataResponse message</head>

     <eg>(01)   &lt;s11:Envelope
(02)      xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'
(03)      xmlns:wsa='http://www.w3.org/2005/08/addressing'
(04)      xmlns:wsp='http://www.w3.org/ns/ws-policy'
(05)      xmlns:mex='http://www.w3.org/&wsmex.nsprefix;/ws-mex'>
(06)    &lt;s11:Header>
(07)      &lt;wsa:To>http://client.example.org&lt;/wsa:To>
(08)      &lt;wsa:Action>
(09)        http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadataResponse
(10)      &lt;/wsa:Action>
(11)      &lt;wsa:RelatesTo>
(12)        urn:uuid:73d7edfc-5c3c-49b9-ba46-2480caee43e9
(13)      &lt;/wsa:RelatesTo>
(14)    &lt;/s11:Header>
(15)    &lt;s11:Body>
(16)      &lt;mex:Metadata>
(17)        &lt;mex:MetadataSection
(18)            Dialect='http://www.w3.org/ns/ws-policy'
(19)            Identifier='http://services.example.org/stockquote/policy'>
(20)          &lt;wsp:Policy>
(21)            &lt;wsp:ExactlyOne>
(22)              &lt;!-- Policy alternatives -->
(23)            &lt;/wsp:ExactlyOne>
(24)          &lt;/wsp:Policy>
(25)        &lt;/mex:MetadataSection>
(26)      &lt;/mex:Metadata>
(27)    &lt;/s11:Body>
(28)  &lt;/s11:Envelope&gt;</eg>
    </example>

    <p>
     Lines 8-10 in <specref ref="GetMexRes"/> indicate this message is a 
     response to a GetMetadata request, and lines 11-13 indicate that it 
     is a response to the request in <specref ref="GetMexReq"/>. Lines 
     16-26 contain a single Metadata Section (lines 17-25); line 18 
     indicates that the metadata in this section is of type, or 
     Dialect, WS-Policy while line 19 identifies a specific policy 
     document. Line 22 would have contained the policy expressions for the 
     Web service endpoint to which the GetMetadata request of 
     <specref ref="GetMexReq"/> was directed.
    </p>
   </div2>
  </div1>
 
  <div1 id="Notation">
   <head>Notation</head>
   
   <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/&wsmex.nsprefix;/ws-mex">http://www.w3.org/&wsmex.nsprefix;/ws-mex</loc></eg>
    </example>
 
    <p> 
     <specref ref="XMLNS"/> lists XML namespaces that are used in this 
     specification. The choice of any namespace prefix is arbitrary and 
     not semantically significant.
    </p>

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

     <tbody>
      <tr>
       <th align="left"> Prefix </th>
       <th align="left"> XML Namespaces </th>
       <th align="left"> Specification(s) </th>
      </tr>
      <tr>
       <td> s </td>
       <td> (Either SOAP 1.1 or 1.2) </td> 
       <td> (Either SOAP 1.1 or 1.2) </td> 
      </tr>
      <tr>
       <td> s11 </td>
       <td> http://schemas.xmlsoap.org/soap/envelope/ </td> 
       <td> <bibref ref="SOAP11"/> </td> 
      </tr>
      <tr>
       <td> s12 </td>
       <td> http://www.w3.org/2003/05/soap-envelope </td> 
       <td> <bibref ref="SOAP121"/> </td> 
      </tr>
      <tr>
       <td> wsa </td>
       <td> http://www.w3.org/2005/08/addressing </td> 
       <td> <bibref ref="AddrCore"/> </td> 
      </tr>
      <tr>
       <td> wsdl </td>
       <td> http://schemas.xmlsoap.org/wsdl/ </td> 
       <td> <bibref ref="WSDL11"/> </td> 
      </tr>
      <tr>
       <td> wsp </td>
       <td> http://www.w3.org/ns/ws-policy </td> 
       <td> <bibref ref="wspolicy"/> </td> 
      </tr>
      <tr>
       <td> mex </td>
       <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex </td> 
       <td> This specification </td> 
      </tr>
      <tr>
       <td> mxp </td>
       <td> http://www.w3.org/&wsmex.nsprefix;/ws-mxp </td> 
       <td> This specification </td> 
      </tr>
      <tr>
       <td> xs </td>
       <td> http://www.w3.org/2001/XMLSchema </td> 
       <td> <bibref ref="XMLSchema1"/> </td> 
      </tr>
      <tr>
       <td> wst </td>
       <td> http://www.w3.org/&wsmex.nsprefix;/ws-tra </td> 
       <td> <bibref ref="WS-Transfer"/> </td> 
      </tr>
     </tbody>
    </table>

    <p>
     The working group intends to update the value of the Web Services
     Metadata Exchange 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 Metadata Exchange 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="Conventions">
    <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 outlines for 
     messages:
    </p>

    <ulist>
     <item>
      <p>
       The syntax appears as an XML instance, but values in italics 
       indicate data types instead of literal values.
      </p>
     </item> 
     <item>
      <p>
       Characters are appended to elements and attributes to indicate 
       cardinality:
      </p>
      <ulist> 
       <item> <p> "?" (0 or 1) </p> </item> 
       <item> <p> "*" (0 or more) </p> </item> 
       <item> <p> "+" (1 or more) </p> </item>
      </ulist> 
     </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>
       Ellipses (i.e., "...") indicate points of extensibility.
      </p> 
     </item>
     <item>
      <p>
       XML namespace prefixes (see <specref ref="XMLNS"/>) 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 IRI. </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>

    <p>
     This specification can be used in terms of XML Information Set (Infoset)
     <bibref ref="XMLInfoset"/>, even though the specification uses XML 1.0
     terminology. Valid Infoset for this specification is the one
     serializable in XML 1.0, hence the use of XML 1.0.
    </p>
    
   </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>
     In cases where it is either desirable or necessary for the receiver
     of a request that has been extended to indicate that it has
     recognized and accepted the semantics associated with that extension,
     it is RECOMMENDED that the receiver add a corresponding extension
     to the response message.  The definition of an extension SHOULD clearly
     specify how the extension that appears in the response correlates
     with that in the corresponding request.
    </p>

    <p>
     Extension elements and attributes MUST NOT use the Web Services
     Metadata Exchange namespace URI.
    </p>
   </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"/>). 
    </p>

    <p>
     Unless otherwise noted, all IRIs are absolute IRIs and IRI comparison
     MUST be performed according to <bibref ref="RFC3987"/> section 5.3.1.
    </p>

    <p>
     For any message defined by this specification, any OPTIONAL elements
     or attributes in the message MAY be used by senders of the message,
     however receivers of those messages MUST understand those OPTIONAL
     elements and attributes, unless other behavior is explicitly defined
     by this specification.
    </p>

    <p>
     Support for the GetMetadata operation by a Web service is 
     OPTIONAL. If metadata about a Web service endpoint is referenced by 
     a Metadata Reference, which is a 
     <bibref ref='AddrCore'/> endpoint reference, then the Metadata 
     Reference MUST refer to a <bibref ref='WS-Transfer'/> resource. 
     The referred resource MAY also support other resource management 
     and access specifications (e.g. HTTP, WS-ResourceFramework).
    </p>

   </div2>
  </div1>
 
  <div1 id = 'metadata-resources'>
   <head>Metadata Resources</head> 

   <p>
    A resource is a Web service that is addressable by an endpoint 
    reference <bibref ref='AddrCore'/> and can 
    be represented by an XML Infoset. The resource's representation can be 
    retrieved using the Get operation defined in 
    <bibref ref='WS-Transfer'/>.
   </p>

   <p>
    When the representation of a resource is mex:Metadata, as defined 
    in <specref ref="web-services-metadata"/>, or any other document format 
    (e.g.
    <bibref ref='XMLSchema1'/>,<bibref ref='XMLSchema2'/>, 
    <bibref ref='WSDL11'/>, 
    <bibref ref='wspolicy'/>) for which a mex:MetadataSection/@Dialect has 
    been defined, then the resource is referred as 'metadata resource'. 
    The representation of a metadata resource MAY be retrieved and/or 
    updated as any other <bibref ref='WS-Transfer'/> resource. 
    Specifically, the representation of a metadata resource MUST be 
    retrievable through a <bibref ref='WS-Transfer'/> Get operation.
   </p>
   
   <p>
    A Web service endpoint MAY have one or more associated metadata 
    resources. A Web service endpoint MAY also support direct retrieval 
    of metadata by requesters using a GetMetadata operation directed 
    to the Web service endpoint itself, as described in 
    <specref ref="Get-Metadata"/>.
   </p> 

   <p>
    A metadata resource MAY support other operations defined by 
    <bibref ref='WS-Transfer'/>, such as Put (e.g. to allow update of 
    non-static metadata by authorized agents), or other resource management 
    and access specifications (e.g. HTTP, WS-ResourceFramework).
   </p>

  </div1>

  <div1 id = 'web-services-metadata'>
   <head>Web Services Metadata</head> 

   <p>
    The Web service Metadata element is a collection of metadata units 
    such as <bibref ref='WSDL11'/> definitions, <bibref ref='XMLSchema1'/> 
    documents, <bibref ref='wspolicy'/> expressions, etc. Each unit 
    corresponds to metadata for a given scope, domain, or namespace. The 
    collection of units is represented by a Metadata element, and units 
    within the collection are represented by Metadata Section elements.
   </p>
   
   <p>
    To facilitate processing, Metadata Sections are tagged with a 
    @Dialect and (OPTIONALLY) @Identifier of the metadata unit. To ensure 
    scalability, a unit of metadata MAY be included in-line within its 
    Metadata Section or MAY be included by reference, either an endpoint 
    reference <bibref ref='AddrCore'/> 
    (Metadata Reference) or a URL (Location).
   </p>

   <p>
    The outline for the Metadata element is: 
   </p>

   <example>
    <eg>&lt;mex:Metadata ...>
  &lt;mex:MetadataSection Dialect="<emph>xs:anyURI</emph>"
                      (Identifier="<emph>xs:anyURI</emph>")? ...>
  (
    &lt;mex:MetadataReference ...>
      <emph>endpoint-reference-type</emph>
    &lt;/mex:MetadataReference>
    |
    &lt;mex:Location> <emph>xs:anyURI</emph> &lt;/mex:Location>
    |
    DialectSpecificElement
  )
  &lt;/mex:MetadataSection> *
  <emph>xs:any</emph>*
&lt;/mex:Metadata&gt;</eg>
   </example>
    
   <p>
    The following describes additional constraints on the outline listed 
    above:
   </p>
   
   <glist>
    <gitem>
     <label>/mex:Metadata</label>
     <def>
      <p>
       This contains one Metadata Section child for each distinct unit of 
       metadata. When there is a large amount of metadata, the [children] 
       SHOULD contain Metadata References or Locations instead of the 
       actual information.
      </p>
     </def>
    </gitem>
     
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection</label>
     <def>
      <p>
       This represents a single unit of metadata (e.g., a WSDL 
       definitions, an XML Schema document) for a given scope, domain, 
       or namespace. A Metadata Section contains exactly one child 
       element, either the embedded XML for the metadata unit, an 
       endpoint reference to a Metadata Resource for the metadata 
       unit, or a URL to metadata unit.
      </p>
     </def>
    </gitem>
 
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection/@Dialect</label>
     <def>
      <p>
       This indicates the format and version of the metadata unit 
       contained in this Metadata Section (e.g., WSDL version 1.1). Dialect 
       is an absolute IRI. 
      </p>
     </def>
    </gitem>
   </glist>

   <p>
    This specification defines the following values for Dialect; 
    other specifications SHOULD define values for Dialect for their 
    metadata format(s).
   </p>

   <table border ='1'>
    <tbody>
     <tr>
      <th align="left"> Dialect IRI </th>
      <th align="left"> Metadata Format </th>
     </tr>
     <tr>
      <td> http://www.w3.org/2001/XMLSchema </td> 
      <td> xs:schema <bibref ref="XMLSchema1"/> </td> 
     </tr>
     <tr>
      <td> http://schemas.xmlsoap.org/wsdl/ </td> 
      <td> wsdl:definitions <bibref ref="WSDL11"/> </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/ns/ws-policy </td> 
      <td> wsp:Policy <bibref ref="wspolicy"/> </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/TR/ws-policy-attach </td> 
      <td> wsp:PolicyAttachment <bibref ref="WS-PolicyAttachment"/> </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex </td> 
      <td> mex:Metadata [Defined in this specification] </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex-all </td> 
      <td> None.  [Defined in this specification for use in GetMetadata requests.  See <specref ref='Get-Metadata'/>.] </td> 
     </tr>
    </tbody>
   </table>

   <p>
    If there is more than one metadata unit with the same Dialect, e.g., 
    more than one XML Schema document, including them all, one per 
    Metadata Section, is explicitly encouraged.
   </p>
  
   <glist>
    <gitem>
     <label>
      /mex:Metadata/mex:MetadataSection/@Dialect ="http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex"
     </label>
     <def>
      <p>
       This Dialect value indicates that the type of the metadata contained 
       within the Metadata Section is itself a mex:Metadata element.  
       When the Dialect value is used in conjunction with 
       mex:MetadataReference or mex:Location, the Dialect value provides 
       the ability to include metadata by reference (an endpoint 
       reference or a URL).
       <specref ref="EPRMD"/> illustrates the use of this Dialect.
      </p>
     </def>
    </gitem>
    
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection/@Identifier</label>
     <def>
      <p>
       This indicates the Identifier for the metadata unit in this 
       Metadata Section. Identifier is an absolute IRI. 
       If omitted, there is no implied value.
      </p>

      <p>
       The interpretation of Identifier is Dialect-specific. While the 
       Dialect attribute indicates the metadata format and version of 
       the metadata in the Metadata Section, the Identifier attribute 
       MAY be used to identify a Metadata Section or to just differentiate 
       between Metadata Sections containing the same type of metadata. 
       The value of the Identifier MAY be the same as the value of 
       one of the attributes or elements of the metadata in 
       the Metadata Section (if the metadata is included by value) or 
       in the representation of a metadata resource (if the metadata 
       is include by reference through Metadata Reference or Location). 
       A metadata publisher MAY choose any value for the Identifier. 
       The values of Identifier attributes in multiple Metadata Section 
       elements in the same Metadata element MAY be the 
       same. For well-known metadata formats, it is RECOMMENDED 
       that the value of the Identifier comes from the metadata when 
       that is possible, as the table below shows.
      </p>
     </def> 
    </gitem>
   </glist>

   <table border ='1'>
    <tbody>
     <tr>
      <th align="left"> Dialect IRI </th>
      <th align="left"> @Identifier value </th>
     </tr>
     <tr>
      <td> http://www.w3.org/2001/XMLSchema </td> 
      <td> xs:schema/@targetNamespace </td> 
     </tr>
     <tr>
      <td> http://schemas.xmlsoap.org/wsdl/ </td> 
      <td> wsdl:definitions/@targetNamespace  </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/ns/ws-policy </td> 
      <td> wsp:Policy/@Name </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/TR/ws-policy-attach </td> 
      <td> Not defined </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex </td> 
      <td> Not defined </td> 
     </tr>
     <tr>
      <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex-all </td> 
      <td> Not defined </td> 
     </tr>
    </tbody>
   </table>

   <p>
    If there is more than one metadata section with the same 
    identifier, e.g., more than one XML Schema in the same target 
    namespace, including them all, one per metadata section, is 
    explicitly encouraged.
   </p>
   
   <glist>
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection/mex:MetadataReference</label>
     <def>
      <p>
       This is an endpoint reference to a metadata resource and is 
       of type EndpointReferenceType as defined by <bibref ref='AddrCore'/>. 
       The resource MUST support the GET operation 
       <bibref ref='WS-Transfer'/> to allow the retrieval of the 
       metadata unit for the Metadata Section's Dialect and Identifier 
       (if any). When this element is present, it MUST have no 
       element siblings.
      </p>
     </def>
    </gitem>
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection/mex:Location</label>
     <def>
      <p>
       This contains a URL to metadata, and the metadata MUST be 
       retrievable from that URL using the primary access mechanism for 
       the scheme of the URL. For example, for an HTTP URL, the 
       metadata MUST be retrievable by sending an HTTP GET request to 
       the URL. When this element is present, it MUST have no 
       element siblings.
      </p>
     </def>
    </gitem>
    <gitem>
     <label>/mex:Metadata/mex:MetadataSection/DialectSpecificElement</label>
     <def>
      <p>
       When any element other than Metadata Reference or Location is 
       present, the element is to be interpreted as the representation of 
       the metadata unit associated with the Metadata Section's Dialect 
       and Identifier.
      </p>
     </def> 
    </gitem>
   </glist>
  </div1>
   
  <div1 id="Retrieving-Metadata">
   <head>Retrieving Metadata</head>
    
   <div2 id="WS-Transfer-Get">
    <head>WS-Transfer Get</head>
     
    <p>
     To retrieve the representation of a metadata resource, a requester 
     MAY send a <bibref ref='WS-Transfer'/> Get request message to the 
     metadata resource's endpoint. The WS-Transfer Get request fetches a 
     one-time snapshot of the metadata. The metadata associated with a 
     service endpoint MAY be available as multiple metadata resources. 
    </p>

    <p>
     The representation of a metadata resource MAY be a mex:Metadata 
     element which MAY contain one or more mex:MetadataSection children.  
     Each MetadataSection is identified by a specific Dialect and 
     contains information whose format and content depend on the Dialect.
    </p>
    
    <p>
     The representation of a metadata resource MAY also be
     any other document format (e.g. <bibref ref='XMLSchema1'/>, 
     <bibref ref='XMLSchema2'/>, <bibref ref='WSDL11'/>, 
     <bibref ref='wspolicy'/>) for which a Dialect value is defined.
    </p>
   </div2>
   
   <div2 id="Get-Metadata">
    <head>Get Metadata</head>

    <p>
     A requester MAY send a GetMetadata request message to an endpoint to 
     retrieve the metadata associated with that endpoint.
     A service endpoint MAY 
     support the GetMetadata request. Observe that, in the case where 
     a service endpoint is also a <bibref ref='WS-Transfer'/> resource, 
     the <bibref ref='WS-Transfer'/> Get operation allows requesters to 
     retrieve the resource representation associated with that endpoint 
     (i.e. the "data"), while the GetMetadata operation can be used to 
     retrieve that endpoint's metadata. The normative outline for a 
     GetMetadata request is:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadata

<kw>[Body]</kw>
  &lt;mex:GetMetadata ... >
    &lt;mex:Dialect URI="<emph>xs:anyURI</emph>" 
                 Identifier="<emph>xs:anyURI</emph>" ?
                 Content="<emph>xs:anyURI</emph>" ? .../> *
    <emph>xs:any</emph>*
  &lt;/mex:GetMetadata&gt; </eg>
    </example>

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

    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect </label>
      <def>
       <p>
        When this repeating OPTIONAL element is present,the response
        MUST include only Metadata Sections corresponding to the
        Dialect specified by the IRI attribute; if the receiver does 
        not have any Metadata Sections of the indicated Dialect, the 
        response MUST include zero Metadata Sections. </p>

	<p>When this element 
        is not present, the endpoint SHOULD return all the types of metadata that it deems necessary to communicate with it.
       </p>
      </def>
     </gitem>
     <gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect@URI </label>
      <def>
       <p>
        This REQUIRED attribute specifies the Metadata Dialect. The response 
        MUST only include Metadata Sections corresponding to the Dialect 
        specified by this IRI. If the receiver does not have any Metadata 
        Sections of this indicated Dialect, the response MUST include zero 
        Metadata Sections for this IRI. 
       </p>
      </def>
     </gitem>
<gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect@URI="http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex-all"  </label>
      <def>
       <p>
        This value returns all known metadata.  The endpoint has the option to optimize the format in which it returns the data. 
       </p>
      </def>
     </gitem>
<gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect@URI="http://www.w3.org/&wsmex.nsprefix;/ws-mex/Dialects/ws-mex"</label>
      <def>
       <p>
        This value returns no metadata sections. 
       </p>
      </def>
     </gitem>
     <gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect@Identifier </label>
      <def>
       <p>
        When this OPTIONAL attribute is present, the response MUST include only
        Metadata Sections with the indicated identifier; if the receiver 
        does not have any Metadata Sections of the indicated identifier, 
        the response MUST include zero Metadata Sections for this
        IRI/Identifier pair.
        When this attribute is not present, the implied value is any 
        identifier. 
        If multiple Metadata Sections have the indicated Dialect 
        and Identifier then all of them MUST be returned.
       </p>
      </def>
     </gitem>

     <gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadata/mex:Dialect@Content </label>
      <def>
       <p>
        When this OPTIONAL attribute is present, the response MUST include only
        Metadata Sections of this specified content form. If the specified
        content form is not available, or not known,
        then the response MUST include zero
        Metadata Sections of the specified form for this IRI/Identifier pair.
        This specification defines the following content form IRIs:
       </p>
       <table border ='1'>
        <tbody>
         <tr>
          <th align="left"> Content Form IRI </th>
          <th align="left"> Form </th>
         </tr>
         <tr>
          <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/EPR </td> 
          <td> A MetadataReference element is returned </td> 
         </tr>
         <tr>
          <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/URI </td> 
          <td> A Location element is returned </td> 
         </tr>
         <tr>
          <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/Metadata </td> 
          <td> The metadata is inlined </td> 
         </tr>
         <tr>
          <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/Any </td> 
          <td> The service is free to chose any content form </td> 
         </tr>
         <tr>
          <td> http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/All </td> 
          <td> The service MUST return all available content forms </td> 
         </tr>
        </tbody>
       </table>
       <p>
        When not present the default value is 
        "http://www.w3.org/&wsmex.nsprefix;/ws-mex/Content/Any".
       </p>
      </def>
     </gitem>

    </glist>

    <p>
     Other message information headers defined by WS-Addressing 
     <bibref ref='AddrCore'/> MAY be included 
     in the request and response messages, according to the usage and 
     semantics defined in WS-Addressing.
    </p>
    
    <p>
     An endpoint MAY respond with a fault message using the standard 
     fault codes defined in WS-Addressing 
     <bibref ref='AddrCore'/> (e.g., wsa:ActionNotSupported).
    </p>

    <p>
     If an endpoint accepts a GetMetadata request, it MUST reply with 
     a GetMetadataResponse message. The normative outline for a 
     GetMetadataResponse is:
    </p>

    <example>
     <eg><kw>[Action]</kw>
  http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadataResponse

<kw>[Body]</kw>
  &lt;mex:GetMetadataResponse>
    &lt;mex:Metadata ...> ...  &lt;/mex:Metadata&gt;
    <emph>xs:any</emph>*
  &lt;/mex:GetMetadataResponse></eg>
    </example>

    <p>
     The following describes additional, normative constraints on the 
     outline listed above:
    </p>
    
    <glist>
     <gitem>
      <label> <kw>[Body]</kw>/mex:GetMetadataResponse/mex:Metadata </label>
      <def>
       <p>
        The body of the response message MUST contain one mex:Metadata 
        element as defined in <specref ref="web-services-metadata"/>.
       </p>
      </def>
     </gitem>
    </glist>

    <p>
     This operation is safe; it will not result in any side effect
     imputable to the requester. This means that in case of an underlying
     protocol error that might get unnoticed, resending the same request
     can be done automatically.
    </p>

   </div2>
  </div1>
  
  <div1 id="Metadata-in-Endpoint-References">
    <head>Metadata in Endpoint References</head>

    <div2 id="Endpoint-References-Containing-mex-Metadata">
      <head>Endpoint References Containing mex:Metadata</head>

      <p>
        <specref ref="Retrieving-Metadata"/> describes two mechanisms that 
        allow requesters to retrieve ("pull metadata") Web services metadata 
        from an endpoint (GetMetadata) or a metadata resource 
        (WS-Transfer Get).
      </p>

      <p>
        In addition to these mechanisms, the issuer of a service endpoint 
        reference MAY include Web services metadata for that service inside 
        the endpoint reference itself. This mechanism ("push metadata") 
        simplifies the bootstrapping of the service interaction on the 
        requester side by avoiding additional calls to retrieve (pull) 
        the Web service metadata for the service endpoint.
      </p>  

      <p>
        Embedding a mex:Metadata element inside an endpoint reference allows 
        the issuer of the endpoint reference to include metadata by value 
        or by reference, according to the options described in 
        <specref ref="web-services-metadata"/>. 
        The outline of a <bibref ref='AddrCore'/> endpoint reference which 
        includes Web services metadata is as follows:
      </p>

      <example>
        <eg>&lt;wsa:EndpointReference ...>
  &lt;wsa:Address> <emph>xs:anyURI</emph> &lt;/wsa:Address>
  &lt;wsa:ReferenceParameters> <emph>xs:any</emph>* &lt;/wsa:ReferenceParameters> ?
  &lt;wsa:Metadata>
    &lt;mex:Metadata> <emph>xs:any</emph>* &lt;/mex:Metadata>?
    <emph>xs:any</emph>*
  &lt;/wsa:Metadata> ?
  <emph>xs:any</emph>*
&lt;/wsa:EndpointReference&gt;</eg>
      </example>

      <glist>
        <gitem>
          <label> /wsa:EndpointReference/wsa:Metadata/mex:Metadata </label>
          <def>
            <p>
              A unique mex:Metadata element appearing as a direct child of the 
              wsa:Metadata endpoint reference element.
            </p>
          </def>
        </gitem>
      </glist>

      <p>
        In the example of <specref ref="EPRMEX"/>, a <bibref ref='AddrCore'/> 
        endpoint reference contains WSDL metadata by value that identifies 
        the binding used to access the service endpoint:
      </p>

      <example id="EPRMEX">
        <head>Endpoint reference with embedded WSDL metadata</head>

        <eg>(01) &lt;wsa:EndpointReference
(02)      xmlns:wsa='http://www.w3.org/2005/08/addressing'>
(03)   &lt;wsa:Address>http://services.example.org/stockquote&lt;/wsa:Address>
(04)   &lt;wsa:Metadata>
(05)     &lt;mex:Metadata xmlns:mex='http://www.w3.org/&wsmex.nsprefix;/ws-mex'>
(06)       &lt;mex:MetadataSection Dialect='http://schemas.xmlsoap.org/wsdl/'>
(07)         &lt;wsdl:definitions
(08)              name='StockQuote'
(09)              targetNamespace='http://services.example.org/stockquote'
(10)              xmlns:tns='http://services.example.org/stockquote'
(11)              xmlns:wsoap='http://schemas.xmlsoap.org/wsdl/soap/'
(12)              xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
(13)              xmlns:wsp='http://www.w3.org/ns/ws-policy'
(14)              xmlns:msgs='http://services.example.org/stockquote/schemas
(15)              xmlns:xs='http://www.w3.org/2001/XMLSchema'>
(16)           &lt;wsdl:import
(17)                namespace='http://services.example.org/stockquote'
(18)                location='http://services.example.org/stockquote/schemas' />
(19)           &lt;wsdl:portType name='StockQuotePortType'>
(20)             &lt;wsdl:operation name='GetLastTradePrice'>
(21)               &lt;wsdl:input message='msgs:GetLastTradePriceInput'
(22)                            name='GetLastTradePriceInput'/>
(23)               &lt;wsdl:output message='msgs:GetLastTradePriceOutput'
(24)                             name='GetLastTradePriceOutput'/>
(25)             &lt;/wsdl:operation>
(26)           &lt;/wsdl:portType>
(27)           &lt;wsdl:binding name='StockQuoteBinding'
(28)                  type='tns:StockQuotePortType'>
(29)             &lt;wsp:PolicyReference
(30)                  URI='http://services.example.org/stockquote/policy' />
(31)             &lt;wsoap:binding style='document'
(32)                           transport='http://schemas.xmlsoap.org/soap/http'/>
(33)             &lt;wsdl:operation name='GetLastTradePrice'>
(34)               &lt;wsoap:operation soapAction='http://services.example.org/stockquote/GetLastTradePrice' />
(35)               &lt;wsdl:input name='GetLastTradePriceInput'>
(36)                 &lt;wsoap:body use='literal'/>
(37)               &lt;/wsdl:input>
(38)               &lt;wsdl:output name='GetLastTradePriceOutput'>
(39)                 &lt;wsoap:body use='literal'/>
(40)               &lt;/wsdl:output>
(41)             &lt;/wsdl:operation>
(42)           &lt;/wsdl:binding>
(43)           &lt;wsdl:service name='StockQuoteService'>
(44)             &lt;wsdl:port name='StockQuotePort'
(45)                         binding='tns:StockQuoteBinding' >
(46)               &lt;wsoap:address
(47)                         location='http://services.example.org/stockquote' />
(48)             &lt;/wsdl:port>
(49)           &lt;/wsdl:service>
(50)         &lt;/wsdl:definitions>
(51)       &lt;/mex:MetadataSection>
(52)       &lt;mex:MetadataSection
(53)            Dialect='http://www.w3.org/2001/XMLSchema'
(54)            Identifier='http://services.example.org/stockquote/schemas'>
(55)         &lt;mex:MetadataReference>
(56)           &lt;wsa:Address>
(57)              http://services.example.org/stockquote/schemas
(58)           &lt;/wsa:Address>
(59)         &lt;/mex:MetadataReference>
(60)       &lt;/mex:MetadataSection>
(61)     &lt;/mex:Metadata>
(62)   &lt;/wsa:Metadata>
(63) &lt;/wsa:EndpointReference&gt;</eg>
      </example>

      <p>
        Lines 4-62 in <specref ref="EPRMEX"/> show the way a Metadata element 
        can be embedded 
        in the endpoint reference of a service. The Metadata element contains 
        two Metadata Sections. In the first one (lines 6-51) the WSDL of the 
        Web service endpoint is included 'by value'. In the second 
        Metadata Section (lines 52-60) an endpoint reference to a 
        metadata resource is shown. The representation of the metadata 
        resource is an XML Schema as hinted by the Dialect attribute (line 53) 
        and is distinguished from other XML Schemas for that Web 
        service endpoint by the value of Identifier attribute (line 54) 
        which in this case happens to be the same as the value of 
        the targetNamespace attribute of the XML Schema. The 
        <bibref ref='WS-Transfer'/> Get operation can be used to retrieve 
        the referred XML Schema. Since no metadata is available about the 
        metadata resource, it is assumed that binding-related information 
        was communicated out-of-band (e.g. an application domain-specific 
        specification has defined a binding for that domain) so that the 
        requester could send a <bibref ref='WS-Transfer'/> Get request 
        to the metadata resource's endpoint, as defined in 
        <specref ref="Bootstrapping-Metadata-Retrieval"/>.
      </p>

      <example id="EPRMD">
        <head>Endpoint reference with embedded metadata about the Metadata Reference</head>

        <eg>(01) &lt;wsa:EndpointReference
(02)      xmlns:wsa='http://www.w3.org/2005/08/addressing'>
(03)   &lt;wsa:Address>http://services.example.org/stockquote&lt;/wsa:Address>
(04)   &lt;wsa:Metadata>
(05)     &lt;mex:Metadata xmlns:mex='http://www.w3.org/&wsmex.nsprefix;/ws-mex'>
(06)       &lt;mex:MetadataSection
(07)           Dialect='http://www.w3.org/&wsmex.nsprefix;/ws-mex'>
(08)         &lt;mex:MetadataReference>
(09)           &lt;wsa:Address>
(10)             http://services.example.org/stockquote/metadata
(11)           &lt;/wsa:Address>
(12)           &lt;wsa:Metadata>
(13)             &lt;mex:Metadata>
(14)               &lt;mex:MetadataSection
(15)                 Dialect='http://schemas.xmlsoap.org/wsdl/'>
(16)                 &lt;!-- Reference to WS-Transfer WSDL wst:Resource portType
(17)                    plus binding -->
(18)               &lt;/mex:MetadataSection>
(19)            &lt;/mex:Metadata>
(20)           &lt;/wsa:Metadata>
(21)         &lt;/mex:MetadataReference>
(22)       &lt;/mex:MetadataSection>
(23)     &lt;/mex:Metadata>
(24)   &lt;/wsa:Metadata>
(25) &lt;/wsa:EndpointReference&gt;</eg>
      </example>

      <p>
        <specref ref="EPRMD"/> shows an example of a Web service endpoint 
        reference in which the Metadata element contains a single 
        Metadata Reference element to a metadata resource (lines 8-21) the 
        representation of which is mex:Metadata as hinted by the value of 
        the Dialect attribute (line 7). The Metadata Reference contains a 
        Metadata element (lines 13-19) which contains the necessary metadata for 
        interacting with the metadata resource through 
        <bibref ref='WS-Transfer'/> operations. Since the Metadata 
        Reference is an endpoint reference to a <bibref ref='WS-Transfer'/> 
        resource, the embedded metadata includes the <bibref ref='WS-Transfer'/> 
        WSDL portType and the necessary binding information for communicating 
        with that resource.
      </p>
    </div2>

    <div2 id="Associating-Policies-With-Endpoint-References">
      <head>Associating Policies With Endpoint References</head>

      <p>
        It is desirable for components that provide EPRs to other components to be able to
        communicate the effective policies of the endpoints referenced by those EPRs. For example,
        a subscriber may wish to indicate to an event source that the notification messages sent as
        part of a subscription must be digitally signed. Although the mechanisms described in
        <specref ref="Endpoint-References-Containing-mex-Metadata"/> can be used to communicate the
        complete set of policies associated with an endpoint, the relationship of these policies to
        specific bindings, operations, or messages cannot be determined without additional
        information such as WSDL documents or wsp:PolicyAttachment elements.
      </p>

      <p>
        A single wsp:Policy or wsp:PolicyReference element MAY appear as a child of the
        /wsa:EndpointReference/wsa:Metadata element.
      </p>

      <example>
       <eg>&lt;wsa:EndpointReference&gt;
&lt;wsa:Address&gt; <emph>xs:anyURI</emph> &lt;/wsa:Address&gt;
&lt;wsa:ReferenceParameters&gt; <emph>xs:any</emph>* &lt;/wsa:ReferenceParameters&gt;
  &lt;wsa:Metadata&gt;
    <kw>( &lt;wsp:Policy ...&gt; ... &lt;/wsp:Policy&gt; |
      &lt;wsp:PolicyReference ...&gt; ... &lt;/wsp:PolicyReference&gt; )</kw> ?
  &lt;/wsa:Metadata&gt;
&lt;/wsa:EndpointReference&gt;</eg>
      </example>

      <p>
        If multiple alternatives are desired as part of this single policy, the operators defined
        in <bibref ref='wspolicy'/> can be used to specify such a structure.
      </p>

      <p>
        The scope of a Policy in an EPR is the endpoint referenced by that EPR. The assertions
        within the alternatives contained by a Policy in an EPR MUST have endpoint policy
        subject. Policy scopes and subjects are defined in <bibref ref='WS-PolicyAttachment'/>.
      </p>

      <example id="PAEPR">
        <head>Endpoint Reference with Associated Policy</head>
        <eg>(01) &lt;wse:NotifyTo xmlns:wsa="http://www.w3.org/2005/08/addressing"
(02)               xmlns:wse="http://www.w3.org/2009/09/ws-evt"&gt;
(03)   &lt;wsa:Address&gt;http://www.example.com/EventSink/OnPriceChange&lt;/wsa:Address&gt;
(04)   &lt;wsa:RerenceParameters&gt;
(05)     ...
(06)   &lt;/wsa:ReferenceParameters&gt;
(07)   &lt;wsa:Metadata&gt;
(08)     &lt;wsp:Policy xmlns:wsp="..." wmlns:sp="..."&gt;
(09)       &lt;sp:SymmetricBinding&gt;
(10)         &lt;wsp:Policy&gt;
(11)           &lt;sp:ProtectionToken&gt;
(12)             &lt;wsp:Policy&gt;
(13)               &lt;sp:SecureConversationToken ...&gt;
(14)                 ...
(15)               &lt;/sp:SecureConversationToken&gt;
(16)             &lt;/wsp:Policy&gt;
(17)           &lt;/sp:ProtectionToken&gt;
(18)         &lt;/wsp:Policy&gt;
(19)       &lt;sp:SymmetricBinding&gt;
(20)     &lt;/wsp:Policy&gt;
(21)   &lt;/wsa:Metadata&gt;
(22) &lt;/wse:NotifyTo&gt;</eg>
      </example>

      <p>
        <specref ref="PAEPR"/> shows a WS-Eventing NotifyTo EPR that refers to the endpoint to
        which an event source should send notification messages. Attached to this EPR is a Policy
        (lines 8-20) that indicates that WS-SecureConversation must be used when sending messages
        to this endpoint.
      </p>

      <p>
        The <bibref ref='AddrCore'/> specification discusses caveats to the validity of Metadata
        information. These apply to Policies embedded within the wsa:Metadata element as discussed
        in this section.
      </p>
    </div2>
  </div1>
  
  <div1 id="Bootstrapping-Metadata-Retrieval">
   <head>Bootstrapping Metadata Retrieval</head>
   
   <p>
    This specification provides several mechanisms to aid service 
    endpoints and service requesters in bootstrapping the interaction. 
    In particular, the mechanisms described in 
    <specref ref="Metadata-in-Endpoint-References"/> allow issuers of 
    endpoint references to include sufficient protocol binding information 
    to allow requesters to issue a Get request against a metadata 
    resource, or a GetMetadata request against a service endpoint, in 
    order to retrieve all the information needed to use the service.
   </p>  
   
   <p>
    When that information is not available, however, requesters will 
    rely on contextual or out-of-band information in order to choose 
    the protocol binding most appropriate to use in retrieving Web 
    service metadata. Furthermore, specific protocol bindings for 
    metadata retrieval MAY be defined by communities within the 
    context of particular application domains. 
   </p>
  </div1>

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

   <p>
    It is strongly RECOMMENDED that the communication between Web services 
    be secured using the mechanisms described in WS-Security 
    <bibref ref='WSSecurity'/>. In order to properly secure messages, 
    the body and all relevant headers need to be included in the 
    signature. Specifically, any standard messaging headers, such as 
    those from WS-Addressing 
    <bibref ref='AddrCore'/>, need to be signed with the body in 
    order to "bind" the two together.
   </p>
   
   <p>
    Different security mechanisms might be desired depending on the 
    frequency of messages. For example, for infrequent messages, public key 
    technologies might be adequate for integrity and confidentiality. 
    However, for high-frequency events, it might be more performant to 
    establish a security context for the events using the mechanisms 
    described in <bibref ref='WSTrust'/> and 
    <bibref ref='WSSecureConversation'/>. Note that if 
    a shared secret is used it is RECOMMENDED that derived keys be used 
    to strengthen the secret as described in WS-SecureConversation.
   </p>
   
   <p>
    Requests for metadata that are not available to anonymous parties are 
    strongly RECOMMENDED to require usage of WS-Security so that the 
    requester can be authenticated and authorized to access the indicated 
    metadata. Similarly, integrity and confidentiality SHOULD be used 
    whenever metadata has restricted access.
   </p> 

   <p>
    Recipients of metadata are RECOMMENDED to validate the signature 
    to authenticate and verify the integrity of the data. Specifically, 
    recipients SHOULD verify that the sender has the right to "speak" for 
    the metadata. This is important because some metadata, such as 
    schemas, have embedded target IRIs that might be outside the scope 
    of the sender. 
   </p>
   
   <p>
    Additionally, some metadata formats, such as policies 
    <bibref ref='wspolicy'/>, can have embedded security 
    semantics. These SHOULD be verified using the same considerations 
    outlined in this section.
   </p>
 
   <p>
    The following list summarizes common classes of attacks that apply to 
    this protocol and identifies the mechanism to prevent/mitigate 
    the attacks:
   </p>

   <ulist>
    <item>
     <p>
      <kw>Message alteration</kw> - Alteration is prevented by including 
      signatures of the message information using WS-Security.
     </p>
    </item>
    <item>
     <p>
      <kw>Message disclosure</kw> - Confidentiality is preserved by 
      encrypting sensitive data using WS-Security.
     </p>
    </item>
    <item>
     <p>
      <kw>Key integrity</kw> - Key integrity is maintained by using 
      the strongest algorithms possible (by comparing secured policies 
      - see <bibref ref='wspolicy'/> and 
      <bibref ref='WSSecurityPolicy'/>)
     </p>
    </item>
    <item>
     <p>
      <kw>Authentication</kw> - 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>
      <kw>Accountability</kw> - Accountability is a function of the type 
      of and strength 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>
      <kw>Availability</kw> - Metadata services are subject to a variety 
      of availability attacks such as application-level denial of 
      service. It is RECOMMENDED that the mechanisms described in 
      WS-Security be considered as mitigations for some forms of 
      attacks. Other attacks, such as network-level denial of service 
      are harder to avoid. Note that both of these classes of attack 
      are outside the scope of this specification.
     </p>
    </item>
    <item>
     <p>
      <kw>Replay</kw> - Messages can be replayed for a variety of 
      reasons. To detect and eliminate this attack, mechanisms SHOULD 
      be used to identify replayed messages such as the timestamp/nonce 
      outlined in WS-Security. Alternatively, and OPTIONALLY, other 
      technologies, such as sequencing, can also be used to prevent 
      replay of application messages.
     </p>
    </item>
   </ulist>
  </div1>

  <div1 id="metadata">
   <head>WS-Metadata Exchange Metadata</head>

   <p>
    An endpoint MAY indicate that it supports WS-MetadataExchange, or its 
    features,
    by including the WS-MetadataExchange Policy assertion within its WSDL. By
    doing so the endpoint is indicating that the corresponding 
    WS-MetadataExchange
    operations are supported by that endpoint even though they do not
    explicitly appear in its WSDL (i.e. the WSDL that MAY be retrievable by 
    using a WS-MetadataExchange GetMetadata with a Dialect IRI of
    http://schemas.xmlsoap.org/wsdl/).
   </p>

   <p>
    An endpoint MAY choose to expose the WS-MetadataExchange WSDL by using the
    following WS-MetadataExchange Dialect:
   </p>

   <table border="1">
    <tbody>
     <tr>
      <th align="left"> Dialect IRI </th>
      <th> @Identifier value </th>
     </tr>
     <tr>
      <td> http://www.w3.org/2009/02/ws-mex/MetadataExchangeWSDL  </td>
      <td> Not defined </td>
     </tr>
    </tbody>
   </table>

   <p>
    The WS-MetadataExchange WSDL can be annotated to indicate any endpoint
    specific metadata that might be needed by clients interacting with
    this service.  For example, the WSDL MAY have policy assertions that
    indicate a particular security mechanism used to protect the
    WS-MetadataExchange operations supported by this endpoint.
   </p>

   <div2>
    <head>MetadataExchange Assertion</head>

    <p>
     The mechanism for indicating that a binding or endpoint conforms to the
     WS-MetadataExchange specification is through the use of the Web Services
     Policy - Framework <bibref ref="wspolicy"/> and Web Services Policy -
     Attachment <bibref ref="WS-PolicyAttachment"/> specifications.
    </p>

    <p>
     This specification defines a policy assertion (wsmxp:MetadataExchange).  
     The wsmxp:MetadataExchange policy assertion applies to the endpoint 
     policy subject.
    </p>

    <p>
     For WSDL 1.1, these assertions may be attached to wsdl11:port or
     wsdl11:binding. For WSDL 2.0, they may be attached to wsdl20:endpoint or
     wsdl20:binding. A policy expression containing the wsmxp:MetadataExchange
     policy assertion MUST NOT be attached to a wsdl:portType or
     wsdl20:interface.
    </p>

    <p>
     The wsmxp:MetadataExchange policy assertion is a nested policy container
     assertion. The meaning of this assertion, when present in a policy
     alternative, is that WS-MetadataExchange is required to communicate with 
     the subject and that the subject supports WS-MetadataExchange. 
    </p>
    
    <p>
     In order to indicate that the subject supports WS-MetadataExchange
     but does not require its use, an additional policy alternative should
     be provided which does not contain this assertion. The compact
     authoring style for an OPTIONAL policy assertion (the wsp:Optional
     attribute) provided by WS-Policy may be used to indicate two policy
     alternatives, one which contains the policy assertion, and another
     which does not.
    </p>

    <p>
     The normative outline of this assertion is:
    </p>

    <example>
     <eg>&lt;wsmxp:MetadataExchange ...>
  &lt;wsmxp:MetadataExchangeDialect ...>
    <emph>xs:anyURI</emph>
  &lt;/wsmxp:MetadataExchangeDialect> * 
  &lt;wsmxp:MetadataContent ...> <emph>xs:anyURI</emph> &lt;/wsmxp:MetadataContent> *
  ...
&lt;/wsmxp:MetadataExchange></eg>
    </example>

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

    <glist>

     <gitem>
      <label> /wsmxp:MetadataExchange </label>
       <def>
        <p>
         This policy assertion specifies that WS-Exchange protocol MUST be 
         used when communicating with this endpoint. This assertion has 
         Endpoint Policy Subject.
        </p>
       </def>
     </gitem>

     <gitem>
      <label> /wsmxp:MetadataExchange/wsmxp:MetadataExchangeDialect </label>
       <def>
        <p>
         When present, this OPTIONAL parameter indicates support for the
         specified MetadataExchange Dialect IRI.
        </p>
       </def>
     </gitem>

     <gitem>
      <label> /wsmxp:MetadataExchange/wsmxp:MetadataContent </label>
       <def>
        <p>
         When present, this OPTIONAL parameter indicates support for the
         specified MetadataExchange content IRI for the MetadataExchange
         Dialect with which it is associated.
        </p>
       </def>
     </gitem>

    </glist>

    <p>
     Note: Metadata resources use the corresponding policy assertions for the 
     WS-Transfer operation that they support.
    </p>
   </div2>

  </div1>

  <div1 id="Acknowledgements">
   <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),
      Ram Jeyaraman (Microsoft Corp.),
      Sreedhara Narayanaswamy (CA),
      Sumeet Vij (Software AG),
      Vikas Varma (Software AG),
      Wu Chou (Avaya Communications),
      Yves Lafon (W3C).
   </p>
  </div1>

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

   <div2>
    <head>Normative References</head>

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

     <bibl key="RFC 3986" id="RFC3986"
      href="http://www.ietf.org/rfc/rfc3986.txt">
       <titleref>
        Uniform Resource Identifier (URI): Generic Syntax
       </titleref>
       , T. Berners-Lee, R. Fields and L. Masinter, Authors.
       Network Working Group, January 2005.
     </bibl>

     <bibl key="RFC 3987" id="RFC3987"
      href="http://www.ietf.org/rfc/rfc3987.txt">
       <titleref>
        Internationalized Resource Identifiers (IRIs)
       </titleref>
       , M. Duerst and M. Suignard, Authors.
       Internet Engineering Task Force, January 2005.
     </bibl>

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

     <bibl key="SOAP12" id="SOAP121"
      href="http://www.w3.org/TR/soap12-part1/">
       <titleref>
        W3C Recommendation, "SOAP Version 1.2 Part 1: Messaging Framework"
       </titleref>
       , M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. Frystyk Nielson,
        Editors.
       World Wide Web Consortium (W3C), 27 April 2007.
     </bibl>

     <bibl key="WS-Addressing" id="AddrCore"
      href="http://www.w3.org/TR/ws-addr-core">
       <titleref>
        W3C Recommendation, "Web Services Addressing 1.0 (WS-Addressing)"
       </titleref>
       , M. Gudgin, M. Hadley, T. Rogers, Editors.
       World Wide Web Consortium (W3C), 9 May 2006.
     </bibl>

     <bibl key="WS-Policy" id="wspolicy"
      href="http://www.w3.org/TR/ws-policy/">
       <titleref>
        W3C Recommendation, "Web Services Policy (WS-Policy) 1.5 - Framework"
       </titleref>
       , A. Vedamuthu, et al., Editors.
       World Wide Web Consortium (W3C), 4 September 2007.
     </bibl>

     <bibl id="WS-PolicyAttachment" key="WS-PolicyAttachment"
        href="http://www.w3.org/TR/ws-policy-attach/">
      <titleref>
       W3C Recommendation, "Web Services Policy (WS-Policy) 1.5 - Attachment"
      </titleref>
      , A. Vedamuthu, et al., Editors.
      World Wide Web Consortium (W3C), 4 September 2007.
     </bibl>

     <bibl id="WS-Transfer" key="WS-Transfer"
        href="http://www.w3.org/TR/ws-transfer">
      <titleref>
       W3C Working Group Draft, "Web Services Transfer (WS-Transfer)1.1"
      </titleref>
      , D. Davis, et al., Editors. 
      World Wide Web Consortium (W3C), 15 September 2009. 
     </bibl>

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

     <bibl key="XML Infoset" id="XMLInfoset"
      href="http://www.w3.org/TR/xml-infoset">
       <titleref>
        W3C Recommendation, "XML Information Set (Second Edition)"
       </titleref>
       , J. Cowan, R. Tobin, Editors.
       World Wide Web Consortium (W3C), 4 February 2004.
     </bibl>

     <bibl key="XMLSchema - Part 1" id="XMLSchema1"
      href="http://www.w3.org/TR/xmlschema-1/">
       <titleref>
        W3C Recommendation, "XML Schema Part 1: Structures (Second Edition)"
       </titleref>
       , H. Thompson, et al., Editors.
       World Wide Web Consortium (W3C), 28 October 2004.
     </bibl>

     <bibl key="XMLSchema - Part 2" id="XMLSchema2"
      href="http://www.w3.org/TR/xmlschema-2/">
       <titleref>
        W3C Recommendation, "XML Schema Part 2: Datatypes (Second Edition)"
       </titleref>
       , P. Biron, A. Malhotra, Editors.
       World Wide Web Consortium (W3C), 28 October 2004.
     </bibl>

    </blist>
   </div2>
 
   <div2>
    <head>Informative References</head>

    <blist>
     <bibl key="WS-SecureConversation" id="WSSecureConversation"
      href="http://docs.oasis-open.org/ws-sx/ws-secureconversation/v1.4/os/ws-secureconversation-1.4-spec-os.doc">
       <titleref>
        OASIS Standard, "Web Services Secure Conversation
          (WS-SecureConversation) 1.4"
       </titleref>
       , A. Nadalin, et al., Editors.
       Organization for the Advancement of Structured Information Standards
         (OASIS), 2 February 2009.
     </bibl>

     <bibl key="WS-Security" id="WSSecurity"
      href="http://docs.oasis-open.org/wss/v1.1/wss-v1.1-spec-os-SOAPMessageSecurity.pdf">
       <titleref>
        OASIS Standard, "Web Services Security: SOAP Message Security 1.1"
       </titleref>
       , K. Lawrence, C. Kaler, Editors.
       Organization for the Advancement of Structured Information Standards
         (OASIS), 1 February 2006.
     </bibl>

     <bibl key="WS-SecurityPolicy" id="WSSecurityPolicy"
      href="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/os/ws-securitypolicy-1.3-spec-os.doc">
       <titleref>
        OASIS Standard, "Web Services Security Policy (WS-SecurityPolicy) 1.3,
          Version 1.1"
       </titleref>
       , K. Lawrence, C. Kaler, Editors.
       Organization for the Advancement of Structured Information Standards
         (OASIS), 2 February 2009.
     </bibl>

     <bibl key="WS-Trust" id="WSTrust"
      href="http://docs.oasis-open.org/ws-sx/ws-trust/v1.4/os/ws-trust-1.4-spec-os.doc">
       <titleref>
        OASIS Standard, "Web Services Trust (WS-Trust) 1.4"
       </titleref>
       , K. Lawrence, C. Kaler, Editors.
       Organization for the Advancement of Structured Information Standards
         (OASIS), 2 February 2009.
     </bibl>
    </blist>
   </div2>
 
  </div1>
 </body>
 
 <back>
  <div1 id="Appendix-A">
   <head>XML Schema</head>
   
   <p>
    A normative copy of the XML Schema <bibref ref='XMLSchema1'/>,
    <bibref ref='XMLSchema2'/> description for this specification can be 
    retrieved from the following address:
   </p>
   
   <example>
    <eg><loc href='http://www.w3.org/&wsmex.nsprefix;/ws-mex/MetadataExchange.xsd'>http://www.w3.org/&wsmex.nsprefix;/ws-mex/MetadataExchange.xsd</loc></eg>
   </example>

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

   <example>
    <eg>&lt;xs:schema
    targetNamespace='http://www.w3.org/&wsmex.nsprefix;/ws-mex'
    xmlns:tns='http://www.w3.org/&wsmex.nsprefix;/ws-mex'
    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/2005/08/addressing"
      schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd"/>

  &lt;!-- GetMetadata request -->
  &lt;xs:element name='GetMetadata'>
    &lt;xs:complexType>
      &lt;xs:sequence>
        &lt;xs:element ref='tns:Dialect' 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;!-- GetMetadataResponse -->
  &lt;xs:element name='GetMetadataResponse'>
    &lt;xs:complexType>
      &lt;xs:sequence>
        &lt;xs:element ref='tns:Metadata'/>
        &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:element name='Dialect'>
    &lt;xs:complexType>
      &lt;xs:attribute name='URI' type='xs:anyURI' use='required'/>
      &lt;xs:attribute name='Identifier' type='xs:anyURI'/>
      &lt;xs:attribute name='Content' type='xs:anyURI'/>
      &lt;xs:anyAttribute namespace='##other' processContents='lax'/>
    &lt;/xs:complexType>
  &lt;/xs:element>

  &lt;!-- Metadata -->
  &lt;xs:element name='Metadata'>
    &lt;xs:complexType>
      &lt;xs:sequence>
        &lt;xs:element ref='tns:MetadataSection'
                    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:element name='MetadataSection'>
    &lt;xs:complexType>
      &lt;xs:choice>
        &lt;xs:any namespace='##other' processContents='lax'/>
        &lt;xs:element name='MetadataReference' type='wsa:EndpointReferenceType' />
        &lt;xs:element ref='tns:Location'/>
      &lt;/xs:choice>
      &lt;xs:attribute name='Dialect' type='xs:anyURI' use='required'/>
      &lt;xs:attribute name='Identifier' type='xs:anyURI'/>
      &lt;xs:anyAttribute namespace='##other' processContents='lax'/>
    &lt;/xs:complexType>
  &lt;/xs:element>

  &lt;xs:element name='Location' type='xs:anyURI'/>
&lt;/xs:schema></eg>
   </example>
  </div1>

  <div1 id="Appendix-B">
   <head>WSDL</head>
   
   <p>
    A normative copy of the WSDL <bibref ref='WSDL11'/> description for 
    this specification can be retrieved from the following address:
   </p>
   
   <example>
    <eg><loc href='http://www.w3.org/&wsmex.nsprefix;/ws-mex/metadataexchange.wsdl'>http://www.w3.org/&wsmex.nsprefix;/ws-mex/metadataexchange.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/&wsmex.nsprefix;/ws-mex'
    xmlns:tns='http://www.w3.org/&wsmex.nsprefix;/ws-mex'
    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:xs='http://www.w3.org/2001/XMLSchema'>

  &lt;wsdl:types>
    &lt;xs:schema
        targetNamespace='http://www.w3.org/&wsmex.nsprefix;/ws-mex'>
      &lt;xs:include schemaLocation='metadataexchange.xsd'/>
    &lt;/xs:schema>
  &lt;/wsdl:types>

  &lt;wsdl:message name='GetMetadataMsg'>
    &lt;wsdl:part name='body' element='tns:GetMetadata'/>
  &lt;/wsdl:message>
  &lt;wsdl:message name='GetMetadataResponseMsg'>
    &lt;wsdl:part name='body' element='tns:GetMetadataResponse'/>
  &lt;/wsdl:message>
  &lt;wsdl:portType name='MetadataExchange'>
    &lt;wsdl:operation name='GetMetadata'>
      &lt;wsdl:input
       message='tns:GetMetadataMsg'
       wsam:Action=
        'http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadata'/>
      &lt;wsdl:output
       message='tns:GetMetadataResponseMsg'
       wsam:Action=
        'http://www.w3.org/&wsmex.nsprefix;/ws-mex/GetMetadataResponse'/>
    &lt;/wsdl:operation>
  &lt;/wsdl:portType>

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

  <div1 id="policyXSD">
   <head>MetadataExchange Policy Schema</head>

   <p>
    A normative copy of the XML Schema description for the MetadataExchange
    Policy assertion can be retrieved from the following address:
   </p>

   <example>
    <eg>http://www.w3.org/2009/09/ws-mex/MetadataExchangePolicy.xsd</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/09/ws-mxp"
    xmlns:tns="http://www.w3.org/2009/09/ws-mxp"
    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:complexType name="URI">
    &lt;xs:simpleContent>
      &lt;xs:extension base="xs:anyURI">
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/>
      &lt;/xs:extension>
    &lt;/xs:simpleContent>
  &lt;/xs:complexType>

  &lt;xs:element name="MetadataExchange">
    &lt;xs:complexType>
      &lt;xs:sequence>
        &lt;xs:element name="MetadataExchangeDialect type="tns:URI" minOccurs="0"
                                                  maxOccurs="unbounded"/>
        &lt;xs:element name="MetadataContent type="tns:URI" 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:schema></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/04 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6442">6442</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=6639">6639</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> KW </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6405">6405</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/17 </td>
      <td> KW </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6604">6604</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/03/18 </td>
      <td> AM </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6404">6404</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=6728">6728</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=6433">6433</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/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>
     <tr>
      <td> 2009/07/21 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7122">7122</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/07/21 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6500">6500</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/04 </td>
      <td> DD </td>
      <td> Added resolution of issues
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6719">6719</loc>,
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6720">6720</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/06 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7194">7194</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/06 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6679">6679</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/18 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7206">7206</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/18 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7195">7195</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/25 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7365">7365</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/08/25 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7270">7270</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/09/01 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6702">6702</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/09/02 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6694">6694</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/09/02 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6533">6533</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/09/23 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6570">6570</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/10/02 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7426">7426</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/10/05 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6406">6406</loc>,
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6721">6721</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/10/13 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7827">7827</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/10/20 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7068">7068</loc>
      </td>
     </tr>
     <tr>
      <td> 2009/10/20 </td>
      <td> DD </td>
      <td> Added resolution of issue 
       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7207">7207</loc>
      </td>
     </tr>
    </tbody>
   </table>
  </div1>

 </back>
</spec>
