<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.2+Addr//EN" "xmlspec.dtd">
<!--
/*
 * Copyright © 2007 World Wide Web Consortium,
 *
 * (Massachusetts Institute of Technology, European Research Consortium for
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
 * work is distributed under the W3C® Document License [1] in the hope that
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
 */
    -->
<!-- $Id: ws-policy-attachment.xml,v 1.4 2007/02/23 19:23:07 plehegar Exp $ -->
<?xml-stylesheet type='text/xsl' href='xmlspec-policy.xsl'?><spec w3c-doctype="cr" role="public">
<header>
<title>Web Services Policy 1.5 - Attachment</title>
<w3c-designation>http://www.w3.org/TR/2007/CR-ws-policy-attach-20070228</w3c-designation>
<w3c-doctype>W3C Candidate Recommendation</w3c-doctype>
<pubdate>
<day>28</day>
<month>February</month>
<year>2007</year>
</pubdate>
<publoc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-attach-20070228" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/2007/CR-ws-policy-attach-20070228</loc>
</publoc>
    <altlocs>
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" role="pdf" href="ws-policy-attachment.pdf" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">PDF</loc>
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" role="postscript" href="ws-policy-attachment.ps" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">PostScript</loc>
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" role="xml" href="ws-policy-attachment.xml" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">XML</loc>
	<loc xmlns:xlink="http://www.w3.org/1999/xlink" role="plain" href="ws-policy-attachment.txt" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">plain text</loc>
    </altlocs>
	<prevlocs>
            <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2006/WD-ws-policy-attach-20061117" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/2006/WD-ws-policy-attach-20061117</loc>
        </prevlocs>
<latestloc>
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/ws-policy-attach" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://www.w3.org/TR/ws-policy-attach</loc>
</latestloc>
<authlist>
<author role="editor">
<name>Asir S Vedamuthu</name>
<affiliation>Microsoft Corporation</affiliation>
</author>
<author role="editor">
<name>David Orchard</name>
<affiliation>BEA Systems, Inc.</affiliation>
</author>
<author role="editor">
  <name>Frederick Hirsch</name>
<affiliation>Nokia</affiliation>
</author>
<author role="editor">
<name>Maryann Hondo</name>
<affiliation>IBM Corporation</affiliation>
</author>
<author role="editor">
<name>Prasad Yendluri</name>
<affiliation>webMethods, Inc.</affiliation>
</author>
<author role="editor">
<name>Toufic Boubez</name>
<affiliation>Layer 7 Technologies</affiliation>
</author>
<author role="editor">
  <name>Ümit Yalçinalp</name>
<affiliation>SAP AG.</affiliation>
</author>
</authlist>
<abstract>
<p>
	This specification, Web Services Policy 1.5 - Attachment, defines two
	general-purpose mechanisms for associating policies, as
	defined in Web Services Policy 1.5 - Framework, with the subjects to which they
	apply. This specification also defines how these
	general-purpose mechanisms may be used to associate policies
	with WSDL and UDDI descriptions.
      </p>
</abstract>
    
<status id="Status">

  <p><emph>This section describes the status of this document at the
  time of its publication. Other documents may supersede this
  document. A list of current W3C publications and the latest revision
  of this technical report can be found in the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">W3C technical reports index</loc> at
  http://www.w3.org/TR/.</emph></p>


<p>W3C publishes a <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2005/10/Process-20051014/tr.html#maturity-levels" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Candidate
Recommendation</loc> to indicate that the document is believed to be
stable and to encourage implementation by the developer community. The
<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2002/ws/policy/" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Web Services Policy
Working Group</loc> expects to request that the Director advance this
document to Proposed Recommendation once the Working Group has
demonstrated 4 or more interoperable implementations with the
exception of the following: <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#ws-policy-attachment-for-wsdl20" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">WSDL2.0 attachment</loc>, <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#ExternalPolicyAttachment" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">external policy attachment</loc> and <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#AttachingPoliciesUsingUDDI" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">UDDI attachment</loc>, which shall
require 2 or more implementations. The Working Group does not plan to
request to advance to Proposed Recommendation prior to 30 June
2007.</p>

<p>No features have been identified as <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2005/10/Process-20051014/tr.html#cfi" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">"features
at risk"</loc> by the Web Services Policy Working Group. The Working
Group will maintain an <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2002/ws/policy/wsp-implementation-report.html" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">implementation
report</loc>.</p>

<p>This Working Draft was produced by the members of the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2002/ws/policy/" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Web Services Policy Working
Group</loc>, which is part of the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2002/ws/Activity" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">W3C Web Services
Activity</loc>. The Working Group expects to advance this Working Draft
to Recommendation Status.</p>

<p>A list of <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#change-description" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">changes in this version of
the document</loc> and a <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="ws-policy-attachment-diff20061117.html" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">diff-marked version
against the previous version of this document</loc> are available. Major
changes in this version of the document encompass the clarification of
the relationship between URI domain expression and WSDL 1.1 Element
Identifiers in Section <specref ref="uri-domain-expression"/>.</p>

<p>The Working Group is tracking all comments via <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=WS-Policy&amp;component=Attachment&amp;component=Framework%2BAttachment&amp;component=Framework%2BAttachment%2BGuidelines&amp;component=Framework%2BAttachment%2BPrimer" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Bugzilla</loc>
and highly prefers to receive comments via this system. If access to
Bugzilla is not feasible, you may send your comments to the mailing
list <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:public-ws-policy-comments@w3.org" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">public-ws-policy-comments@w3.org</loc>
mailing list (<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://lists.w3.org/Archives/Public/public-ws-policy-comments/" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">public
archive</loc>). Each Bugzilla entry and email message should contain
only one comment. All comments on this specification should be made
following the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2002/ws/policy/#issues" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Description for
Issues</loc> of the Working Group.</p>

<p>This document was produced by a group operating under the <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">5 February
2004 W3C Patent Policy</loc>. W3C maintains a <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2004/01/pp-impl/39293/status" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">public list of
any patent disclosures</loc> made in connection with the deliverables of
the group; that page also includes instructions for disclosing a
patent. An individual who has actual knowledge of a patent which the
individual believes contains <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">
Essential Claim(s)</loc> must disclose the information in accordance
with <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">
section 6 of the W3C Patent Policy</loc>.</p>

<p>Publication as a Candidate Recommendation 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>

    <langusage>
<language id="en-US">English</language>
</langusage>
<revisiondesc>
<p>Last Modified: $Date: 2007/02/23 19:23:07 $</p>
</revisiondesc>
</header>
<body>
<div1 id="tocRange">
<head>Introduction</head>
<p>
	The Web Services Policy 1.5 - Framework [<bibref ref="WS-Policy"/>]
	specification defines an abstract model and an XML-based
	language for expressing <termref def="policy">policies</termref> of entities in a Web services-based system. 
	This specification, Web Services Policy 1.5 - Attachment,
	defines two general-purpose mechanisms for associating
	policies with the <termref def="policy_subject">subjects</termref> to which they apply; the policies
	may be defined as part of existing metadata about the subject
	or the policies may be defined independently and associated
	through an external binding to the subject.
      </p>
<p>
	To enable Web Services Policy to be used with existing Web
	service technologies, this specification describes the use of
	these general-purpose mechanisms with WSDL [<bibref ref="WSDL11"/>, <bibref ref="WSDL20"/>] definitions and UDDI [<bibref ref="UDDIAPI20"/>, <bibref ref="UDDIDataStructure20"/>,
	<bibref ref="UDDI30"/>].</p>
</div1>
<div1 id="NotationsTerminology">
<head>Notations and Terminology</head>
<p>
	This section specifies the notations, namespaces, and
	terminology used in this specification.
      </p>
<div2 id="NotationalConventions">
<head>Notational Conventions</head>
<p>This specification uses the following syntax within normative outlines: </p>
<ulist>
<item>
<p>The syntax appears as an XML instance, but values in <emph>italics</emph> indicate data types instead of literal values.</p>
</item>
<item>
<p>Characters are appended to elements and attributes to indicate cardinality:
	  <ulist>
<item>
<p>"?" (0 or 1)</p>
</item>
<item>
<p>"*" (0 or more)</p>
</item>
<item>
<p>"+" (1 or more)</p>
</item>
</ulist>
</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>This document relies on the XML Information Set [<bibref ref="XMLInfoset"/>]. Information items properties are
	      indicated by the style <emph role="infoset-property">infoset property</emph>.</p>
</item>
<item>
<p>XML namespace prefixes (see <specref ref="nsprefix"/>) are used to indicate the namespace of the element or attribute being defined. </p>
</item>
<item>
<p>The ellipses characters "…" are used to
	      indicate a point of extensibility that allows other
	      Element or Attribute Information Items.</p>
</item>
</ulist>
<p>Elements and Attributes defined by this specification are referred to in the text of this document using 
XPath 1.0 [XPATH 1.0] expressions. Extensibility points are referred to using an extended version of this 
syntax:</p>
<ulist>
<item>
<p>An element extensibility point is referred to using {any} in place of the element name. This 
indicates that any element name can be used, from any namespace other than the http://www.w3.org/ns/ws-policy 
namespace. </p>
</item>
<item>
<p>An attribute extensibility point is referred to using @{any} in place of the attribute name. This 
indicates that any attribute name can be used, from any namespace. 
namespace. </p>
</item>
</ulist>
<p>Normative text within this specification takes precedence over
	normative outlines, which in turn take precedence over the XML Schema
	[<bibref ref="XMLSchemaPart1"/>] descriptions.</p>
</div2>
<div2 id="XMLNamespaces">
<head>XML Namespaces</head>
<p> This specification uses a number of namespace prefixes throughout; they are
	listed in <specref ref="nsprefix"/>. Note that the choice of any namespace
	prefix is arbitrary and not semantically significant (see [<bibref ref="XML-NS"/>]).</p>
<table summary="Namespace prefixes usage in this specification" id="nsprefix" border="1" cellspacing="0" cellpadding="5">
<caption>Prefixes and Namespaces used in this specification</caption>
<thead>
<tr>
<th rowspan="1" colspan="1">Prefix</th>
<th rowspan="1" colspan="1">XML Namespace</th>
<th rowspan="1" colspan="1">Specification</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="1" colspan="1">
<code>mtom</code>
</td>
<td rowspan="1" colspan="1">
<code>http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-MTOMPolicy"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>rmp</code>
</td>
<td rowspan="1" colspan="1">
<code>http://docs.oasis-open.org/ws-rx/wsrmp/200602</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-RMPolicy"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>sp</code>
</td>
<td rowspan="1" colspan="1">
<code>http://schemas.xmlsoap.org/ws/2005/07/securitypolicy</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-SecurityPolicy"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsa</code>
</td>
<td rowspan="1" colspan="1">
<code>http://www.w3.org/2005/08/addressing</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-Addressing"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsap</code>
</td>
<td rowspan="1" colspan="1">
<code>http://www.w3.org/2006/05/addressing/wsdl</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-AddressingPolicy"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl11</code>
</td>
<td rowspan="1" colspan="1">
<code>http://schemas.xmlsoap.org/wsdl/</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WSDL11"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20</code>
</td>
<td rowspan="1" colspan="1">
<code>http://www.w3.org/2006/01/wsdl</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WSDL20"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsoap12</code>
</td>
<td rowspan="1" colspan="1">
<code>http://schemas.xmlsoap.org/wsdl/soap12/</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WSDL11BindingforSOAP12"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>(none), wsp</code>
</td>
<td rowspan="1" colspan="1">
<code>http://www.w3.org/ns/ws-policy</code>
</td>
<td rowspan="1" colspan="1">This specification</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsse</code>
</td>
<td rowspan="1" colspan="1">
<code>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-Security"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsu</code>
</td>
<td rowspan="1" colspan="1">
<code>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="WS-Security"/>]</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>xs</code>
</td>
<td rowspan="1" colspan="1">
<code>http://www.w3.org/2001/XMLSchema</code>
</td>
<td rowspan="1" colspan="1">[<bibref ref="XMLSchemaPart1"/>]</td>
</tr>
</tbody>
</table>
<p>
	  All information items defined by this specification
	  are identified by the XML namespace URI [<bibref ref="XML-NS"/>] http://www.w3.org/ns/ws-policy. A <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/2007/02/ws-policy.xsd" xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">normative XML
	  Schema</xspecref> [<bibref ref="XMLSchemaPart1"/>, <bibref ref="XMLSchemaPart2"/>] document can be 
	  obtained indirectly by
	dereferencing the namespace document at the WS-Policy 1.5 namespace URI.</p>
<p>
	  In this document reference is made to the <att>wsu:Id</att>
	  attribute in a utility schema (<loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</loc>). The
	  <att>wsu:Id</att> attribute was added to the utility schema
	  with the intent that other specifications requiring such an
	  Id could reference it (as is done here).
	</p>

  <p>It is the intent of the W3C Web Services Policy Working Group that the 
    Web Services Policy 1.5 - Framework and Web Services Policy 1.5 - Attachment XML namespace URI will not change 
    arbitrarily with each subsequent revision of the corresponding XML Schema 
    documents as the specifications transition through Candidate Recommendation, 
    Proposed Recommendation and Recommendation status. However, should the 
    specifications revert to Working Draft status, and a subsequent revision, 
    published as a WD, CR or PR draft, results in non-backwardly compatible 
    changes from a previously published WD, CR or PR draft of the specification, 
    the namespace URI will be changed accordingly.</p>

<p>Under this policy, the following are examples of backwards compatible 
          changes that would not result in assignment of a new XML namespace URI:</p>
<ulist>
<item>
<p>Addition of new global element, attribute, complexType 
              and simpleType definitions.</p>
</item>
<item>
<p>Addition of new elements or attributes in locations 
              covered by a previously specified wildcard.</p>
</item>
<item>
<p>Modifications to the pattern facet of a type definition for which the 
              value-space of the previous definition remains valid or for 
              which the value-space of the preponderance of 
              instance would remain valid.</p>
</item>
<item>
<p>Modifications to the cardinality of elements for which the 
              value-space of possible instance documents conformant to 
              the previous revision of the schema would still be valid 
              with regards to the revised cardinality rule.</p>
</item>
</ulist>
</div2>
<div2 id="Glossary">
<head>Terminology</head>
<p>
	      The keywords "<rfc2119>MUST</rfc2119>", "<rfc2119>MUST
	      NOT</rfc2119>", "<rfc2119>REQUIRED</rfc2119>",
	      "<rfc2119>SHALL</rfc2119>", "<rfc2119>SHALL
	      NOT</rfc2119>", "<rfc2119>SHOULD</rfc2119>",
	      "<rfc2119>SHOULD NOT</rfc2119>",
	      "<rfc2119>RECOMMENDED</rfc2119>",
	      "<rfc2119>MAY</rfc2119>", and
	      "<rfc2119>OPTIONAL</rfc2119>" in this document are to be
	      interpreted as described in RFC 2119 [<bibref ref="RFC2119"/>].
	    </p>
<p>We introduce the following terms that are used throughout this document:</p>
  
<glist>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#effective_policy" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">effective policy</loc>
      </label>
      <def>
         <p>The
<term>effective policy</term>, for a given <termref def="policy_subject">policy subject</termref>, is the 
combination of relevant policies. The relevant policies are those
attached to <termref def="policy_scope">policy scopes</termref> that
contain the <termref def="policy_subject">policy subject</termref>.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#element_policy" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">element policy</loc>
      </label>
      <def>
         <p>The
	<term>element policy</term> is the <termref def="policy">policy</termref> attached to the <termref def="policy_subject">policy subjects</termref> associated with
	the element information item that contains it.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#ignorable_policy_assertion" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">ignorable policy assertion</loc>
      </label>
      <def>
         <p id="ignorable_policy_assertion">An 
	    <term>ignorable policy assertion</term> is 
	    an assertion that may be ignored for policy intersection (as defined in 
	        <xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/ws-policy#Policy_Intersection" xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">4.5 Policy Intersection</xspecref>).</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="#merge" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">merge</loc>
      </label>
      <def>
         <p>A <term>merge</term>
	consists of serializing each policy as a
	<termref def="policy_expression">policy expression</termref>, replacing their
	<el>wsp:Policy</el> element with a
	<el>wsp:All</el> element, and placing each as
	children of a wrapper <el>wsp:Policy</el>
	element.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy</loc>
      </label>
      <def>
         <p id="policy">A <term>policy</term> is a potentially empty collection of 
	    <termref def="policy_alternative">policy alternatives</termref>. </p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_alternative" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy alternative</loc>
      </label>
      <def>
         <p id="policy_alternative">A <term>policy alternative</term> 
	    is a potentially empty collection of <termref def="policy_assertion">policy assertions</termref>.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_assertion" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy assertion</loc>
      </label>
      <def>
         <p id="policy_assertion">A <term>policy assertion</term> 
		represents a requirement, a capability, or other property of a behavior.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_attachment" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy attachment</loc>
      </label>
      <def>
         <p id="policy_attachment">A 
	    <term>policy attachment</term> is a mechanism for associating 
	    <termref def="policy">policy</termref> with one or more <termref def="policy_scope">policy scopes</termref>.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_expression" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy expression</loc>
      </label>
      <def>
         <p id="policy_expression">A <term>policy expression</term> 
		is an XML Infoset representation of a <termref def="policy">policy</termref>, 
		either in a normal form or in an equivalent compact form.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_scope" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy scope</loc>
      </label>
      <def>
         <p id="policy_scope">A <term>policy scope</term> is a collection of 
	    <termref def="policy_subject">policy subjects</termref> to which a policy may apply.</p>
      </def>
   </gitem>
   <gitem>
      <label>
         <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228#policy_subject" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">policy subject</loc>
      </label>
      <def>
         <p id="policy_subject">A <term>policy subject</term> is an entity 
	    (e.g., an endpoint, message, resource, operation) with which a 
	    <termref def="policy">policy</termref> can be associated. </p>
      </def>
   </gitem>
</glist>
  <!-- The following definitions are taken from the WS-Policy-Framework document. They need to be here for the automatic glossary generation. Use the value of the ID for the termdef element in ws-policy-framework.xml inside a p element.-->
<ulist role="termreference">
<item>
<p>ignorable_policy_assertion</p>
</item>
<item>
<p>policy</p>
</item>
<item>
<p>policy_alternative</p>
</item>
<item>
<p>policy_assertion</p>
</item>
<item>
<p>policy_expression</p>
</item>
<item>
<p>policy_subject</p>
</item>
<item>
<p>policy_scope</p>
</item>
<item>
<p>policy_attachment</p>
</item>
</ulist>
</div2>
<div2 id="Example">
<head>Example</head>
<p>This specification defines several mechanisms for
	associating policies (Web Services Policy 1.5 - Framework, [<bibref ref="WS-Policy"/>]) with various XML Web service entities. For
	brevity, we define two sample <termref def="policy_expression">policy expressions</termref> that the
	remainder of this document references. </p>
<p>
<specref ref="Table2"/> indicates a <termref def="policy">policy</termref> for reliable messaging [<bibref ref="WS-RMPolicy"/>]. <specref ref="Table3"/>
	is a policy for securing messages using X509 certificates
	[<bibref ref="WS-SecurityPolicy"/>].</p>
<example id="Table2">
<head>Example RM Policy Expression.</head>
<eg xml:space="preserve">(01) &lt;wsp:Policy
        xmlns:rmp="http://docs.oasis-open.org/ws-rx/wsrmp/200602"
        xmlns:wsp="http://www.w3.org/ns/ws-policy"
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        wsu:Id="RmPolicy" &gt;
(02)   &lt;rmp:RMAssertion&gt;
(03)     &lt;rmp:InactivityTimeout Milliseconds="600000" /&gt;
(04)     &lt;rmp:BaseRetransmissionInterval Milliseconds="3000" /&gt;
(05)     &lt;rmp:ExponentialBackoff /&gt;
(06)     &lt;rmp:AcknowledgementInterval Milliseconds="200" /&gt;
(07)   &lt;/rmp:RMAssertion&gt;
(08) &lt;/wsp:Policy&gt;</eg>
</example>
<example id="Table3">
<head>Example X509 Security Policy Expression.</head>
<eg xml:space="preserve">(01) &lt;wsp:Policy
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsp="http://www.w3.org/ns/ws-policy"
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        wsu:Id="X509EndpointPolicy" &gt;
(02)   &lt;sp:AsymmetricBinding&gt;
(03)     &lt;wsp:Policy&gt;
(04)       &lt;sp:RecipientToken&gt;
(05)         &lt;wsp:Policy&gt;
(06)           &lt;sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"&gt;
(07)             &lt;wsp:Policy&gt;
(08)               &lt;sp:WssX509V3Token10 /&gt;
(09)             &lt;/wsp:Policy&gt;
(10)           &lt;/sp:X509Token&gt;
(11)         &lt;/wsp:Policy&gt;
(12)       &lt;/sp:RecipientToken&gt;
(13)       &lt;sp:InitiatorToken&gt;
(14)         &lt;wsp:Policy&gt;
(15)           &lt;sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" &gt;
(16)             &lt;wsp:Policy&gt;
(17)               &lt;sp:WssX509V3Token10 /&gt;
(18)             &lt;/wsp:Policy&gt;
(19)           &lt;/sp:X509Token&gt;
(20)         &lt;/wsp:Policy&gt;
(21)       &lt;/sp:InitiatorToken&gt;
(22)       &lt;sp:AlgorithmSuite&gt;
(23)         &lt;wsp:Policy&gt;
(24)           &lt;sp:Basic256Rsa15 /&gt;
(25)         &lt;/wsp:Policy&gt;
(26)       &lt;/sp:AlgorithmSuite&gt;
(27)       &lt;sp:Layout&gt;
(28)         &lt;wsp:Policy&gt;
(29)           &lt;sp:Lax /&gt;
(30)         &lt;/wsp:Policy&gt;
(31)       &lt;/sp:Layout&gt;
(32)       &lt;sp:IncludeTimestamp /&gt;
(33)       &lt;sp:OnlySignEntireHeadersAndBody /&gt;
(34)     &lt;/wsp:Policy&gt;
(35)   &lt;/sp:AsymmetricBinding&gt;
(36) &lt;/wsp:Policy&gt;</eg>
</example>
<p>The document containing both of these policy expressions is
	assumed to be located at
	<code>http://www.example.com/policies</code>.  Per Section
	<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228/#Policy_Identification" xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">3.2
	Policy Identification</xspecref> of Web Services Policy 1.5 - Framework [<bibref ref="WS-Policy"/>], the IRIs used for these <termref def="policy_expression">policy expressions</termref>
	in the remainder of this document are
	<code>http://www.example.com/policies#RmPolicy</code> and
	<code>http://www.example.com/policies#X509EndpointPolicy</code>,
	for the examples in <specref ref="Table2"/> and <specref ref="Table3"/>, respectively.</p>
</div2>
</div1>
<div1 id="rPolicyAttachment">
<head>Policy Attachment</head>
<p>This section defines two general-purpose mechanisms for
      associating <termref def="policy">policies</termref> with one or
      more <termref def="policy_subject">policy
      subjects</termref>. The first allows XML-based descriptions of
      resources (represented as XML elements) to associate policy as
      part of their intrinsic definition. The second allows policies
      to be associated with arbitrary policy subjects independently
      from their definition.</p>
<p>In addition it defines the processing rules for scenarios
      where multiple policies are attached to a policy subject.</p>
<div2 id="rEffectivePolicy">
<head>Effective Policy</head>
<p>
<termref def="policy">Policies</termref> will often be
	associated with a particular <termref def="policy_subject">policy subject</termref> using multiple
	<termref def="policy_attachment">policy
	attachments</termref>. For example, there may be attachments
	at different points in a WSDL description that apply to one policy
	subject, and other attachments may be made by UDDI and other
	mechanisms.</p>
<p>When multiple attachments are made, their relevent policies can be combined.  <termdef id="effective_policy" term="effective policy">The
<term>effective policy</term>, for a given <termref def="policy_subject">policy subject</termref>, is the 
combination of relevant policies. The relevant policies are those
attached to <termref def="policy_scope">policy scopes</termref> that
contain the <termref def="policy_subject">policy subject</termref>.</termdef>
</p>
<p>This combination can be achieved through a merge.  <termdef id="merge" term="merge">A <term>merge</term>
	consists of serializing each policy as a
	<termref def="policy_expression">policy expression</termref>, replacing their
	<el>wsp:Policy</el> element with a
	<el>wsp:All</el> element, and placing each as
	children of a wrapper <el>wsp:Policy</el>
	element.</termdef> The resulting policy expression is considered to
	represent the combined policy of all of the attachments to
	that policy subject.</p>
<p>Such calculated policy expressions have no meaningful IRI of their own. </p>
</div2>
<div2 id="PolicyAttachmentMechanisms">
<head>Policy Attachment Mechanisms</head>
<p>This section defines two general-purpose mechanisms for
	associating policies [<bibref ref="WS-Policy"/>] with one or
	more <termref def="policy_subject">policy
	subjects</termref>. The first allows XML-based descriptions of
	resources to associate <termref def="policy">policy</termref>
	as part of their intrinsic definition. The second allows
	policies to be associated with arbitrary policy subjects
	independently from their definition.</p>
  <p>The <termref def="policy_scope">policy scope</termref> of an attachment is specific to the <termref def="policy_attachment">policy attachment</termref>
    Mechanism using it. Accordingly, any <termref def="policy_attachment">policy attachment</termref> mechanism <rfc2119>MUST</rfc2119> define
    the <termref def="policy_scope">policy scope</termref> of the attachment.</p>	
</div2>
<div2 id="XMLElementAttachement">
<head>XML Element Attachment</head>
<p>It is often desirable to associate <termref def="policy">policies</termref> with Web services <termref def="policy_subject">policy subjects</termref> represented as XML elements (i.e., WSDL 1.1 elements - Section <specref ref="AttachingPolicyUsingWSDL1.1"/> for the specific details
	of WSDL attachment).</p>
<p>Since <termref def="policy_assertion">policy assertions</termref> are strongly typed by the authors, the precise
	semantics of how element policy is to be processed once
	discovered is domain-specific; however, implementations are
	likely to follow the precedent specified in the section below
	on WSDL [<bibref ref="WSDL11"/>] and Policy.</p>
<p>This specification defines a global attribute that allows
	<termref def="policy_expression">policy expressions</termref> to be attached to an arbitrary XML
	element. The following is the schema definition for the
	<att>wsp:PolicyURIs</att> attribute:</p>
<eg xml:space="preserve" role="needs-numbering">&lt;xs:schema&gt;
  &lt;xs:attribute name="PolicyURIs"&gt;
    &lt;xs:simpleType&gt;
	&lt;xs:list itemType="xs:anyURI" /&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:attribute&gt;
&lt;/xs:schema&gt;</eg>
<p>The namespace URI [<bibref ref="XML-NS"/>] for this attribute is <code>http://www.w3.org/ns/ws-policy</code>.</p>
<p>The <att>wsp:PolicyURIs</att> attribute contains a white
space-separated list of one or more IRIs  [<bibref ref="RFC3987"/>]. When this attribute is used,
each of the values identifies a <termref def="policy_expression">policy expression</termref> as defined by
[<bibref ref="WS-Policy"/>]. If more than one IRI is specified, the
individual referenced <termref def="policy">policies</termref> need to be <termref def="merge">merged</termref> together
to form a single element <termref def="policy_expression">policy expression</termref>. 
The resultant <termref def="policy">policy</termref> is
then associated with the element information item's <termref def="element_policy">element policy</termref>
property. <termdef id="element_policy" term="element policy">The
	<term>element policy</term> is the <termref def="policy">policy</termref> attached to the <termref def="policy_subject">policy subjects</termref> associated with
	the element information item that contains it.</termdef>
</p>
<p>An example of <termref def="element_policy">element policy</termref> through the use of this global
attribute is given below using the sample policies stated in Section
<specref ref="Example"/>.</p>
<p>If the <termref def="policy">policies</termref> referenced by the following XML element</p>
<eg xml:space="preserve" role="needs-numbering">&lt;MyElement wsp:PolicyURIs="
   http://www.example.com/policies#RmPolicy
   http://www.example.com/policies#X509EndpointPolicy" /&gt;</eg>
<p>have been processed and <termref def="merge">merged</termref>, 
	it would result in an <termref def="element_policy">element policy</termref> 
	whose XML 1.0 representation is listed in <specref ref="Table4"/>:</p>
<example id="Table4">
<head>Example Merged Policy Expression.</head>
<eg xml:space="preserve">(01) &lt;wsp:Policy
            xmlns:rmp="http://docs.oasis-open.org/ws-rx/wsrmp/200602"
            xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
            xmlns:wsp="http://www.w3.org/ns/ws-policy" &gt;
(02)   &lt;wsp:All&gt;
(03)     &lt;rmp:RMAssertion&gt;
(04)        &lt;rmp:InactivityTimeout Milliseconds="600000" /&gt;
(05)          &lt;rmp:BaseRetransmissionInterval Milliseconds="3000" /&gt;
(06)          &lt;rmp:ExponentialBackoff /&gt;
(07)          &lt;rmp:AcknowledgementInterval Milliseconds="200" /&gt;
(08)        &lt;/rmp:RMAssertion&gt;
(09)   &lt;/wsp:All&gt;
(10)   &lt;wsp:All&gt;
(11)     &lt;sp:AsymmetricBinding&gt;
(12)       &lt;wsp:Policy&gt;
(13)         &lt;!-- Details omitted for readability --&gt;
(14)         &lt;sp:IncludeTimestamp /&gt;
(15)         &lt;sp:OnlySignEntireHeadersAndBody /&gt;
(16)       &lt;/wsp:Policy&gt;
(17)     &lt;/sp:AsymmetricBinding&gt;
(18)   &lt;/wsp:All&gt;
(19) &lt;/wsp:Policy&gt;</eg>
</example>
<p>Note that this <termref def="element_policy">element policy</termref> has no meaningful IRI.</p>
<p>The presence of the <att>wsp:PolicyURIs</att> attribute does not
prohibit implementations from using additional mechanisms for
associating <termref def="policy_expression">policy expressions</termref> with XML-based constructs.</p>
<p>Alternatively, rather than using the global attribute, XML elements
  <rfc2119>MAY</rfc2119> use the <el>wsp:Policy</el> or <el>wsp:PolicyReference</el> elements directly as
children, in order to support <termref def="element_policy">element policy</termref> (Per Section
	<xspecref xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-20070228/#Policy_References" xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">4.3.4
	Policy References</xspecref> of Web Services Policy 1.5 - Framework [<bibref ref="WS-Policy"/>]), and the semantics for
this are the same as for the use of the global attribute. For example,
an alternative way of attaching the policies in the above example,
using child elements, would be as follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;MyElement&gt;
  &lt;wsp:PolicyReference
     URI="http://www.example.com/policies#RmPolicy" /&gt;
  &lt;wsp:PolicyReference
     URI="http://www.example.com/policies#X509EndpointPolicy" /&gt;
&lt;MyElement/&gt;</eg>
</div2>
<div2 id="ExternalPolicyAttachment">
<head>External Policy Attachment</head>
<p>This mechanism allows <termref def="policy">policies</termref> to be associated with a <termref def="policy_subject">policy
subject</termref> independent of that subject's definition and/or representation
through the use of a <el>wsp:PolicyAttachment</el>
element.</p>
<p>This element has three components: the <termref def="policy_scope">policy scope</termref> of the
attachment, the <termref def="policy_expression">policy expressions</termref> being bound, and optional security
information. The <termref def="policy_scope">policy scope</termref> of the attachment is defined using one
or more extensible domain expressions that identify <termref def="policy_subject">policy subjects</termref>,
typically using IRIs.</p>
<p>Domain expressions identify the domain of the association. That is,
the set of <termref def="policy_subject">policy subjects</termref> that will be considered for inclusion in
the scope using an extensible domain expression model. Domain
expressions identify <termref def="policy_subject">policy subjects</termref> to be included within the <termref def="policy_scope">policy
scope</termref>. Domain expressions yield an unordered set of <termref def="policy_subject">policy subjects</termref>
for consideration. </p>
<p>For the purposes of attaching <termref def="policy">policy</termref> to a <termref def="policy_subject">policy subject</termref> through
this mechanism, any <termref def="policy_expression">policy expression</termref> contained inside of the
<el>wsp:AppliesTo</el> element <rfc2119>MUST NOT</rfc2119> be
considered in scope. For example, an Endpoint Reference may be used as
a domain expression, and it may contain <termref def="policy_expression">policy expressions</termref> within it,
but this <termref def="policy_expression">policy expressions</termref> are not considered in scope with respect
to the <el>wsp:PolicyAttachment</el> element using it.</p>
<p>The following is the pseudo-schema for the <el>wsp:PolicyAttachment</el> element:</p>
<eg xml:space="preserve" role="needs-numbering">&lt;wsp:PolicyAttachment … &gt;
  &lt;wsp:AppliesTo&gt;
    &lt;x:DomainExpression/&gt; +
  &lt;/wsp:AppliesTo&gt;
  ( &lt;wsp:Policy&gt;…&lt;/wsp:Policy&gt; |
    &lt;wsp:PolicyReference&gt;…&lt;/wsp:PolicyReference&gt; ) +
  &lt;wsse:Security&gt;…&lt;/wsse:Security&gt; ?
  …
&lt;/wsp:PolicyAttachment&gt;</eg>
<p>The following describes the attributes and elements listed in the pseudo-schema outlined above:</p>
<glist>
<gitem>
<label>
<el>/wsp:PolicyAttachment</el>
</label>
<def>
<p>This describes an external <termref def="policy_attachment">policy attachment</termref>.</p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/wsp:AppliesTo</el>
</label>
<def>
<p>This required element's children describe the <termref def="policy_scope">policy scope</termref>.</p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/wsp:AppliesTo/{any}</el>
</label>
<def>
<p>These child elements <rfc2119>MUST</rfc2119> specify and/or
refine the domain expression(s) that define the <termref def="policy_scope">policy scope</termref>. They
<rfc2119>MUST NOT</rfc2119> contradict the semantics of their root
element; if an element is not recognized, it <rfc2119>SHOULD</rfc2119>
be ignored. Domain expressions are XML elements that describe <termref def="policy_subject">policy
subjects</termref> within a <termref def="policy_scope">policy scope</termref>. When more than one domain expression
is present, the <termref def="policy_scope">policy scope</termref> contains the union of the <termref def="policy_subject">policy subjects</termref>
identified by each expression. </p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/wsp:Policy</el>
</label>
<def>
<p>This element is a <termref def="policy_expression">policy expression</termref> representing a <termref def="policy">policy</termref> that
is attached to the <termref def="policy_subject">policy subjects</termref> within the <termref def="policy_scope">policy scope</termref>.</p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/wsp:PolicyReference</el>
</label>
<def>
<p>This element references a <termref def="policy_expression">policy expression</termref> to be attached to
the <termref def="policy_subject">policy subjects</termref> that are in the <termref def="policy_scope">policy scope</termref>. Refer to Web Services Policy 1.5 - Framework [<bibref ref="WS-Policy"/>]
for additional details.</p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/wsse:Security</el>
</label>
<def>
  <p>This element is of type <att>wsse:Security</att> and allows security information such as
signatures to be included. The syntax of this element is described in
WS-Security [<bibref ref="WS-Security"/>].</p>
</def>
</gitem>
<gitem>
<label>
<att>/wsp:PolicyAttachment/@{any}</att>
</label>
<def>
<p>Additional attributes <rfc2119>MAY</rfc2119> be specified but
  <rfc2119>MUST NOT</rfc2119> contradict the semantics of the 
  <emph role="infoset-property">owner element</emph>;
   if an attribute is not recognized, it
<rfc2119>SHOULD</rfc2119> be ignored.</p>
</def>
</gitem>
<gitem>
<label>
<el>/wsp:PolicyAttachment/{any}</el>
</label>
<def>
<p>Other child elements for binding constructs
<rfc2119>MAY</rfc2119> be specified but <rfc2119>MUST NOT</rfc2119>
contradict the semantics of the parent element; if an element is not
recognized, it <rfc2119>SHOULD</rfc2119> be ignored.</p>
</def>
</gitem>
</glist>
<p>Domain expressions are used to identify entities such as endpoints, messages 
  or resources with which a policy can be associated. For example, domain expressions may 
  be used to refer to WSDL 1.1 definitions, WSDL 2.0 components, endpoint references, etc.</p>
<p>The following example illustrates the use of this mechanism with an
EndpointReference domain expression for a deployed endpoint as defined
in Web Services Addressing [<bibref ref="WS-Addressing"/>]:</p>
<eg xml:space="preserve" role="needs-numbering">&lt;wsp:PolicyAttachment&gt;
  &lt;wsp:AppliesTo&gt;
    &lt;wsa:EndpointReference&gt;
      &lt;wsa:Address&gt;http://www.example.com/acct&lt;/wsa:Address&gt;
    &lt;/wsa:EndpointReference&gt;
  &lt;/wsp:AppliesTo&gt;
  &lt;wsp:PolicyReference
     URI="http://www.example.com/policies#RmPolicy" /&gt;
&lt;/wsp:PolicyAttachment&gt;</eg>
<p>In this example, the <termref def="policy_expression">policy expression</termref> at
<code>http://www.example.com/policies#RmPolicy</code> applies to all
interactions with the endpoint at
<code>http://www.example.com/acct</code>.</p>
<div3 id="uri-domain-expression">
    <head>URI Domain Expression</head>
    <p>This section defines a domain expression for identifying resources as 
      <termref def="policy_subject">policy subjects</termref> for the external attachment mechanism. The following 
    is a pseudo-schema for the URI domain expression:</p>
<eg xml:space="preserve" role="needs-numbering">&lt;wsp:PolicyAttachment … &gt;
  &lt;wsp:AppliesTo&gt;
    &lt;wsp:URI … &gt;xs:anyURI&lt;/wsp:URI&gt; *
  &lt;/wsp:AppliesTo&gt;
  …
&lt;/wsp:PolicyAttachment&gt;</eg>
<p>The following describes the URI domain expression element listed in the pseudo-schema outlined above:</p>
<glist>
  <gitem>
    <label><att>/wsp:PolicyAttachment/wsp:AppliesTo/wsp:URI</att></label>
    <def><p>This element is an IRI that references a resource 
      as a <termref def="policy_subject">policy subject</termref>. There is no requirement that the IRI be resolvable; 
    retrieval mechanisms are beyond the scope of this specification.</p></def>
  </gitem>
  <gitem>
    <label><att>/wsp:PolicyReference/wsp:AppliesTo/wsp:URI/@{any}</att></label>
    <def><p>Additional attributes <rfc2119>MAY</rfc2119> be specified but <rfc2119>MUST NOT</rfc2119> contradict the 
      semantics of the <emph role="infoset-property">owner element</emph>; if an attribute is not recognized, 
      it <rfc2119>SHOULD</rfc2119> be ignored.</p></def>
  </gitem>
</glist>
  <p>URI domain expressions are used to identify resources that are identified using 
  IRI or IRI References (such as endpoint, message or operation definitions) with which 
    <termref def="policy">policies</termref> can be associated. For example, URI domain expressions can be used 
  to identify WSDL 1.1 definitions, WSDL 2.0 components, etc. 
  When a URI
  domain expression identifies multiple resources, i.e. WSDL 1.1 supports multiple
  operations with the same name (sometimes called operation name overloading),
  the Policy applies to all the resources that are identified. 
  </p>
  <p>
  IRI References for WSDL 2.0 components 
    are defined in Appendix C of the Web Services Description Language (WSDL) Version 2.0 
    Part 1: Core Language [<bibref ref="WSDL20"/>]. The following 
  example illustrates the use of URI domain expression 
  with a WSDL 2.0 IRI Reference: </p>
  <eg xml:space="preserve" role="needs-numbering">&lt;wsp:PolicyAttachment&gt;
  &lt;wsp:AppliesTo&gt;
    &lt;wsp:URI&gt;http://example.org/TicketAgent.wsdl20#wsdl.endpoint(TicketAgentService/Endpoint)&lt;/wsp:URI&gt;
  &lt;/wsp:AppliesTo&gt;
  &lt;wsp:PolicyReference URI="http://www.example.com/policies#RmPolicy" /&gt;
 &lt;/wsp:PolicyAttachment&gt;</eg>
  <p>In this example, the <termref def="policy_expression">policy expression</termref> at 
   <code>http://www.example.com/policies#RmPolicy</code> applies to all interactions with 
   the endpoint at <code>http://example.org/TicketAgent.wsdl20#wsdl.endpoint(TicketAgentService/Endpoint)</code>. 
 </p>
  <p>
    IRI References for WSDL 1.1 elements are defined in WSDL 1.1 Element Identifiers 
    [<bibref ref="WSDL11EI"/>].
 </p>
 <p>
 The scope of URI domain expressions for WSDL 2.0 components or WSDL 1.1
 elements is limited to the subjects defined in 
 Section <specref ref="ws-policy-attachment-for-wsdl20"/> and 
 <specref ref="AttachingPolicyUsingWSDL1.1"/>.</p>   
   
</div3>
</div2>
  <div2 id="IRI_Policy_Attachment">
    <head>Use of IRIs in Policy Attachment</head>
    <p>
       Policy attachment mechanisms use IRIs for some identifiers. This 
      document does not define a base URI but relies 
      on the mechanisms defined in XML Base [<bibref ref="XMLBASE"/>] and RFCs 3023 [<bibref ref="RFC3023"/>], 
      3986 [<bibref ref="RFC3986"/>] and 3987 [<bibref ref="RFC3987"/>] 
      for establishing a base URI against which relative IRIs can be made absolute.</p>
  </div2>
</div1>
<div1 id="AttachingPolicyUsingWSDL1.1">
<head>Attaching Policies Using WSDL 1.1</head>
 <p>
   This section describes a mechanism for associating policy expressions with Web service constructs in WSDL 1.1 [<bibref ref="WSDL11"/>]. 
   The mechanism consists of:
   </p>  
   <ulist>
     <item>
       <p>A model for attaching policies to WSDL 1.1 constructs. The model defines:
         <ulist>
           <item>
             <p>A partitioning of WSDL constructs into service, endpoint, operation
  and message policy subjects.
  </p>
  </item>
           <item><p>
             The semantics of attaching a <termref def="policy">policy</termref>  
             to each <termref def="policy_subject">policy subject</termref>
</p></item>
           <item><p>
 How to combine policies attached to more than one WSDL construct
  within a single policy subject.
 </p></item>
           </ulist></p>
       </item>
           <item><p>
    An XML representation of policy expressions attached to WSDL 1.1 constructs. 
  </p></item>
           <item><p>
  The annotation of such policy expressions as required extensions using the 
  WSDL-defined extensibility flag <att>@wsdl:required</att>.
 </p></item>
   </ulist>
   <p>   
     WSDL 1.1 disallows the use of extensibility elements on certain elements and
    the use of extensibility attributes on others. However, the WS-I Basic Profile 1.1
     [<bibref ref="BP11"/>] overrules this restriction and allows element extensibility everywhere. 
    
    Therefore, when attaching a reference directly to the WSDL element the policy 
    
    reference SHOULD be attached using <el>wsp:PolicyReference</el> as child element unless
    it 
    
    is absolutely necessary to maintain the original WSDL 1.1 restriction, in which 
    
    case the <att>@wsp:PolicyURIs</att> attribute MAY be used for the following WSDL elements:
    <ulist>
      <item><p>
    <el>wsdl11:portType</el>  
    </p></item>
        <item>
          <p>
    <el>wsdl11:portType/wsdl11:operation/wsdl11:input</el>
    </p></item>
          <item>
            <p>
    <el>wsdl11:portType/wsdl11:operation/wsdl11:output</el>
    </p></item>
        <item>
          <p>
    <el>wsdl11:portType/wsdl11:operation/wsdl11:fault</el>
    </p></item>
  </ulist>
</p>
<p>If it is necessary to include the actual <termref def="policy_expression">policy expressions</termref> within
the WSDL description itself, it is <rfc2119>RECOMMENDED</rfc2119> that
their <el>wsp:Policy</el> elements be included as children of
the <el>wsdl11:definition</el> element, and referenced using
the mechanisms just described. Alternatively, the <termref def="policy_expression">policy expressions</termref>
<rfc2119>MAY</rfc2119> be made available through some other means,
such as WS-MetadataExchange [<bibref ref="WS-MetadataExchange"/>].</p>
<p>To ensure that consumers of policy-annotated WSDL elements are
capable of processing such <termref def="policy_attachment">policy attachments</termref>, attachments using
<el>wsp:PolicyReference</el>
<rfc2119>SHOULD</rfc2119> be
marked as a mandatory extension (e.g., with a
<code>@wsdl11:required="true"</code> attribute).</p>
<p>The rest of this section defines how to interpret the <termref def="policy_attachment">policy
attachments</termref> when they appear within a WSDL description. </p>
<div2 id="CalculatingEffectivyPolicywithWSDL1.1">
<head>Calculating Effective Policy in WSDL 1.1</head>
<p>
<termref def="policy_attachment">Policy attachments</termref> in WSDL 1.1 can be used to associate <termref def="policy">policies</termref>
with four different types of <termref def="policy_subject">policy subject</termref>, identified as the service
policy subject, the endpoint policy subject, the operation policy
subject, and the message policy subject. These policy subjects should be
considered as nested, due to the hierarchical nature of WSDL. </p>
<p>When attaching a <termref def="policy">policy</termref> to a WSDL element, a <termref def="policy_scope">policy scope</termref> is
implied for that attachment. The <termref def="policy_scope">policy scope</termref> only contains the <termref def="policy_subject">policy
subject</termref> associated with that element and not those associated with the
children of that element. Therefore, it is
<rfc2119>RECOMMENDED</rfc2119> that each <termref def="policy_assertion">policy assertion</termref> contained
within a WSDL element's <termref def="element_policy">element policy</termref> should have the correct
semantic such that the policy subject for that assertion is that WSDL
element. For example, assertions that describe behaviours regarding
the manipulation of messages should only be contained within policies
attached to WSDL message elements.</p>
<p>Figure 1 represents how the <termref def="effective_policy">effective policies</termref>, with regard to
WSDL, are calculated for each of these <termref def="policy_subject">policy subjects</termref>. In the
diagram, the dashed boxes represent <termref def="policy_scope">policy scope</termref>s implied by WSDL
elements. For a particular <termref def="policy_subject">policy subject</termref>, the <termref def="effective_policy">effective policy</termref>
<rfc2119>MUST</rfc2119>
<emph>merge</emph> the <termref def="element_policy">element policy</termref> of each
element with a <termref def="policy_scope">policy scope</termref> that contains the <termref def="policy_subject">policy subject</termref>.</p>
<p>For abstract WSDL definitions, the <termref def="element_policy">element policy</termref> is considered an
intrinsic part of the definition and applies to all uses of that
definition. In particular, it <rfc2119>MUST</rfc2119> be
<termref def="merge">merged</termref> into the <termref def="effective_policy">effective policy</termref> of every implementation
of that abstract WSDL definition.</p>
<p>Policies that are attached to a deployed resource (e.g., services
or ports) are only considered in the <termref def="effective_policy">effective policy</termref> of that deployed
resource itself.</p>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" id="Figure1" source="effective-policy-scope.jpg" alt="Effective Policy and Policy Scopes in WSDL" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
<p>(This graphic is also available in SVG format <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/2007/CR-ws-policy-attach-20070228/effective-policy-scope.svg" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">here</loc>.)</p>
<p>When attaching policies at different levels of the WSDL hierarchy, care must be taken. 
A message exchange with an endpoint <rfc2119>MAY</rfc2119> be described by the 
<termref def="effective_policy">effective policies</termref> 
in all four subject types simultaneously.</p>
<p>For example, in <specref ref="Figure1"/>, for a particular input message to a deployed
endpoint, there are four <termref def="policy_subject">policy subjects</termref> involved, each with their own
<termref def="effective_policy">effective policy</termref>. There is an <termref def="effective_policy">effective policy</termref> for the message, as
well as an <termref def="effective_policy">effective policy</termref> for the parent operation of that message,
an <termref def="effective_policy">effective policy</termref> for the deployed endpoint, and the <termref def="effective_policy">effective
policy</termref> for the service as a whole. All four <termref def="effective_policy">effective policies</termref> are
applicable in relation to that specific input message.</p>
<p>It is <rfc2119>RECOMMENDED</rfc2119> that, where specific <termref def="policy_assertion">policy
assertions</termref> associated with one <termref def="policy_subject">policy subject</termref> are only compatible with
specific <termref def="policy_assertion">policy assertions</termref> on another <termref def="policy_subject">policy subject</termref> in the same
hierarchical chain, the policies containing these assertions should be
attached within a single WSDL binding hierarchy. </p>
<p>For any given port, the <termref def="policy_alternative">policy
alternatives</termref> for each <termref def="policy_subject">policy
subject</termref> type <rfc2119>SHOULD</rfc2119> be compatible with
each of the <termref def="policy_attachment">policy
alternatives</termref> at each of the <termref def="policy_subject">policy subjects</termref> parent and child
<termref def="policy_subject">policy subjects</termref>, such that
choices between <termref def="policy_alternative">policy
alternatives</termref> at each level are independent of each
other.</p>
<p>The rest of this section describes these <termref def="policy_subject">policy subject</termref> types, and
how the <termref def="effective_policy">effective policy</termref> for each <termref def="policy_subject">policy subject</termref> is calculated.</p>
<div3 id="ServicePolicySubject">
<head>Service Policy Subject</head>
<p>The following WSDL 1.1 element is considered as the service policy subject:</p>
<ulist>
<item>
<p>
<el>wsdl11:service</el>
</p>
</item>
</ulist>
<p>This element <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per
Section <specref ref="rPolicyAttachment"/>, and if present
<rfc2119>MUST</rfc2119> be <termref def="merge">merged</termref> into the <termref def="effective_policy">effective policy</termref> of the
WSDL service policy subject.</p>
<p>A policy associated with a service policy subject applies to any 
  message exchange using any of the endpoints offered by that service.</p>
</div3>
<div3 id="EndpointPolicySubject">
<head>Endpoint Policy Subject</head>
<p>The following WSDL 1.1 elements collectively describe an endpoint:</p>
<ulist>
<item>
<p>
<el>wsdl11:port</el>
</p>
</item>
<item>
<p>
<el>wsdl11:portType</el>
</p>
</item>
<item>
<p>
<el>wsdl11:binding</el>
</p>
</item>
</ulist>
<p>These elements <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per Section <specref ref="rPolicyAttachment"/>. The <termref def="policy_scope">policy scope</termref> implied by each of these elements contains the endpoint policy subject representing the deployed endpoint.</p>
<p>Since the <el>wsdl11:portType</el> may be used by more than one
binding, it is <rfc2119>RECOMMENDED</rfc2119> that only policies
containing abstract (i.e., binding independent) assertions should be
  attached to this type of element.</p>
<p>Policies associated with an endpoint 
  policy subject apply to any message exchange made using that endpoint.</p>
<p>The <termref def="effective_policy">effective policy</termref> for a WSDL endpoint policy subject includes
the <termref def="element_policy">element policy</termref> of the <el>wsdl11:port</el> element that defines
the endpoint <termref def="merge">merged</termref> with the <termref def="element_policy">element policy</termref> of the
referenced <el>wsdl11:binding</el> element and the <termref def="element_policy">element policy</termref> of
the referenced <el>wsdl11:portType</el> element that defines the
interface of the endpoint.</p>
</div3>
<div3 id="OperationPolicySubject">
<head>Operation Policy Subject</head>
<p>The following WSDL 1.1 elements collectively describe an operation:</p>
<ulist>
<item>
<p>
<el>wsdl11:portType/wsdl11:operation</el>
</p>
</item>
<item>
<p>
<el>wsdl11:binding/wsdl11:operation</el>
</p>
</item>
</ulist>
<p>These elements <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per Section <specref ref="rPolicyAttachment"/>. </p>
<p>The <termref def="policy_scope">policy scope</termref> implied by each of these elements contains the
operation policy subject representing the specific operation of the
endpoint policy subject.</p>
<p>Since the <el>wsdl11:portType/wsdl11:operation</el> may be used by
more than one binding, it is <rfc2119>RECOMMENDED</rfc2119> that only
policies containing abstract (i.e., binding independent) assertions
should be attached to this type of element.</p>
<p>Policies associated with an operation policy subject apply to 
  the message exchange described by that operation.</p>
<p>The <termref def="effective_policy">effective policy</termref> for a WSDL operation policy subject is
calculated in relation to a specific port, and includes the <termref def="element_policy">element
policy</termref> of the <el>wsdl11:portType/wsdl11:operation</el> element that
defines the operation <termref def="merge">merged</termref> with that of the
corresponding <el>wsdl11:binding/wsdl11:operation</el> element.</p>
</div3>
<div3 id="MessagePolicySubject">
<head>Message Policy Subject</head>
<p>The following WSDL 1.1 elements are used to describe messages:</p>
<ulist>
<item>
<p>
<el>wsdl11:message</el>
</p>
</item>
<item>
<p>
<el>wsdl11:portType/wsdl11:operation/wsdl11:input</el>
</p>
</item>
<item>
<p>
<el>wsdl11:portType/wsdl11:operation/wsdl11:output</el>
</p>
</item>
<item>
<p>
<el>wsdl11:portType/wsdl11:operation/wsdl11:fault</el>
</p>
</item>
<item>
<p>
<el>wsdl11:binding/wsdl11:operation/wsdl11:input</el>
</p>
</item>
<item>
<p>
<el>wsdl11:binding/wsdl11:operation/wsdl11:output</el>
</p>
</item>
<item>
<p>
<el>wsdl11:binding/wsdl11:operation/wsdl11:fault</el>
</p>
</item>
</ulist>
<p>These elements <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per Section <specref ref="rPolicyAttachment"/>.</p>
<p>The <termref def="policy_scope">policy scope</termref> implied by these elements contains the message
policy subject representing the specific input, output, or fault
message in relation to the operation policy subject.</p>
<p>Policies associated with a message policy subject apply to that 
  message (i.e. input, output or fault message).</p>
<p>The <termref def="effective_policy">effective policy</termref> for a specific WSDL message (i.e., input,
output, or fault message) is calculated in relation to a specific
port, and includes the <termref def="element_policy">element policy</termref> of the <el>wsdl11:message</el>
element that defines the message's type <termref def="merge">merged</termref> with the
<termref def="element_policy">element policy</termref> of the <el>wsdl11:binding</el> and
<el>wsdl11:portType</el> message definitions that describe that
message. </p>
<p>For example, the <termref def="effective_policy">effective policy</termref> of a specific input message for a
specific port would be the <emph>merge</emph> of the
<el>wsdl11:message</el> element defining the message type, the
<el>wsdl11:portType/wsdl11:operation/wsdl11:input</el> element, and
the corresponding
<el>wsdl11:binding/wsdl11:operation/wsdl11:input</el> element for that
message.</p>
<p>Since a <el>wsdl11:message</el> may be used by more than one
<el>wsdl11:portType</el>, it is <rfc2119>RECOMMENDED</rfc2119> that
only policies containing abstract (i.e., binding independent)
assertions should be attached to this type of element.</p>
<p>Since <el>wsdl11:input</el>, <el>wsdl11:output</el>, and
<el>wsdl11:fault</el> elements in a
 <el>wsdl11:portType/wsdl11:operation</el> may be used by more than
one binding, it is <rfc2119>RECOMMENDED</rfc2119> that only policies
containing abstract (i.e., binding independent) assertions should be
attached to these types of elements.</p>
<p>Care should be taken when attaching policies to outbound messages
as the result may not be what is expected. For example, expressing a
choice on a service's outbound message without a mechanism for a
requester of that service to communicate its choice to the service
before the outbound message is sent may not result in the desired
behaviours. It is therefore <rfc2119>RECOMMENDED</rfc2119> that <termref def="policy_alternative">policy
alternatives</termref> on outbound messages <rfc2119>SHOULD</rfc2119> be avoided
without the use of some form of mutual <termref def="policy">policy</termref> exchange between the
parties involved.</p>
</div3>
<div3 id="Example2">
<head>Example</head>
<p>As an example of the combination of these <termref def="policy_subject">policy subjects</termref> and
<termref def="effective_policy">effective policy</termref> calculation, consider the WSDL type definition in
<specref ref="Table5"/> that references policies. </p>
<example id="Table5">
<head>Example Policy Attached to WSDL.</head>
<eg xml:space="preserve">(01) &lt;wsdl11:definitions name="StockQuote"
        targetNamespace="http://www.example.com/stock/binding"
        xmlns:tns="http://www.example.com/stock/binding"
        xmlns:fab="http://www.example.com/stock"
        xmlns:rmp="http://docs.oasis-open.org/ws-rx/wsrmp/200602"
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/"
        xmlns:wsp="http://www.w3.org/ns/ws-policy"
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" &gt;
(02)   &lt;wsp:Policy wsu:Id="RmPolicy" &gt;
(03)     &lt;rmp:RMAssertion&gt;
(04)       &lt;rmp:InactivityTimeout Milliseconds="600000" /&gt;
(05)       &lt;rmp:BaseRetransmissionInterval Milliseconds="3000" /&gt;
(06)       &lt;rmp:ExponentialBackoff /&gt;
(07)       &lt;rmp:AcknowledgementInterval Milliseconds="200" /&gt;
(08)     &lt;/rmp:RMAssertion&gt;
(09)   &lt;/wsp:Policy&gt;
(10)     &lt;wsp:Policy wsu:Id="X509EndpointPolicy" &gt;
(11)       &lt;sp:AsymmetricBinding&gt;
(12)         &lt;wsp:Policy&gt;
               &lt;!-- Details omitted for readability --&gt;
(13)           &lt;sp:IncludeTimestamp /&gt;
(14)           &lt;sp:OnlySignEntireHeadersAndBody /&gt;
(15)         &lt;/wsp:Policy&gt;
(16)       &lt;/sp:AsymmetricBinding&gt;
(17)     &lt;/wsp:Policy&gt;
(18)     &lt;wsp:Policy wsu:Id="SecureMessagePolicy" &gt;
(19)       &lt;sp:SignedParts&gt;
(20)         &lt;sp:Body /&gt;
(21)       &lt;/sp:SignedParts&gt;
(22)       &lt;sp:EncryptedParts&gt;
(23)         &lt;sp:Body /&gt;
(24)       &lt;/sp:EncryptedParts&gt;
(25)     &lt;/wsp:Policy&gt;
(26)     &lt;wsdl11:import namespace="http://www.example.com/stock"
            location="http://www.example.com/stock/stock.wsdl" /&gt;
(27)     &lt;wsdl11:binding name="StockQuoteSoapBinding" type="fab:Quote" &gt;
(28)       &lt;wsoap12:binding style="document"
(29)          transport="http://schemas.xmlsoap.org/soap/http" /&gt;
(30)       &lt;wsp:PolicyReference URI="#RmPolicy" wsdl11:required="true" /&gt;
(31)       &lt;wsp:PolicyReference URI="#X509EndpointPolicy" wsdl11:required="true" /&gt;
(32)       &lt;wsdl11:operation name="GetLastTradePrice" &gt;
(33)         &lt;wsoap12:operation soapAction="http://www.example.com/stock/Quote/GetLastTradePriceRequest" /&gt;
(34)           &lt;wsdl11:input&gt;
(35)             &lt;wsoap12:body use="literal" /&gt;
(36)             &lt;wsp:PolicyReference URI="#SecureMessagePolicy"
                                      wsdl11:required="true" /&gt;
(37)           &lt;/wsdl11:input&gt;
(38)           &lt;wsdl11:output&gt;
(39)             &lt;wsoap12:body use="literal" /&gt;
(40)             &lt;wsp:PolicyReference URI="#SecureMessagePolicy"
(41)                                  wsdl11:required="true" /&gt;
(42)           &lt;/wsdl11:output&gt;
(43)       &lt;/wsdl11:operation&gt;
(44)     &lt;/wsdl11:binding&gt;
(45) &lt;/wsdl11:definitions&gt;</eg>
</example>
<p>For endpoints bound to <code>StockQuoteSoapBinding</code>, the <termref def="effective_policy">effective policy</termref>
of the endpoint is listed in <specref ref="Table4"/> (above). For
the <code>GetLastTradePrice</code> operation, an additional
message-level <termref def="effective_policy">effective policy</termref> is in effect for the input message,
whose XML 1.0 representation is listed in <specref ref="Table6"/>.</p>
<example id="Table6">
<head>Example Message Security Policy Expression.</head>
<eg xml:space="preserve">(01) &lt;wsp:Policy
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsp="http://www.w3.org/ns/ws-policy"
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        wsu:Id="SecureMessagePolicy" &gt;
(02)   &lt;sp:SignedParts&gt;
(03)     &lt;sp:Body /&gt;
(04)   &lt;/sp:SignedParts&gt;
(05)   &lt;sp:EncryptedParts&gt;
(06)     &lt;sp:Body /&gt;
(07)   &lt;/sp:EncryptedParts&gt;
(08) &lt;/wsp:Policy&gt;</eg>
</example>
</div3>
</div2>
</div1>
<div1 id="ws-policy-attachment-for-wsdl20">
<head>WS-Policy Attachment for WSDL 2.0</head>
<p>This section describes a mechanism for associating policy expressions with Web
                service constructs in WSDL 2.0. The mechanism consists of:</p>
<ulist>
<item>
<p>A model for attaching policies to WSDL 2.0 constructs. The model defines:<ulist>
<item>
<p>A partitioning of WSDL constructs into service, endpoint, operation
                            and message policy subjects.</p>
</item>
<item>
<p>The semantics of attaching a policy to each policy subject.</p>
</item>
<item>
<p>How to combine policies attached to more than one WSDL component
                            within a single policy subject.</p>
</item>
</ulist>
</p>
</item>
<item>
<p>An XML representation of policy expressions attached to WSDL 2.0 constructs.</p>
  </item>
  <item><p>
  The annotation of such policy expressions as required extensions using the
                    WSDL-defined extensibility flag <code>@wsdl20:required</code>.</p>
</item>
</ulist>
<p>
<specref ref="XMLNamespaces"/> lists all the XML Namespaces that are used in this section. (XML
                elements without a namespace prefix are from the Web Services Policy XML Namespace.)</p>
<div2 id="wsdl20-example">
<head>Example</head>
<p>The example below illustrates the use of WS-Policy Attachment for WSDL 2.0:</p>
<example id="table-wsdl20-example">
<head>Example Policy Attached to WSDL 2.0</head>
<eg xml:space="preserve">(01) &lt;wsdl20:description&gt;
(02) …
(03)   &lt;wsp:Policy wsu:Id="common"&gt;
(04)     &lt;mtom:OptimizedMimeSerialization wsp:Optional="true"/&gt;
(05)     &lt;wsap:UsingAddressing /&gt;
(06)   &lt;/wsp:Policy&gt;

(07)   &lt;wsp:Policy wsu:Id="secure"&gt;
(08)     &lt;wsp:ExactlyOne&gt;
(09)       &lt;sp:TransportBinding&gt;…&lt;/sp:TransportBinding&gt;
(10)       &lt;sp:AsymmetricBinding&gt;…&lt;/sp:AsymmetricBinding &gt;
(11)     &lt;/wsp:ExactlyOne&gt;
(12)   &lt;/wsp:Policy&gt;

(13)   &lt;wsdl20:binding name="SecureBinding"
(14)       interface="tns:RealTimeDataInterface" &gt;
(15)     &lt;wsp:PolicyReference URI="#secure" /&gt;
(16)     &lt;wsdl20:operation name="GetRealQuote" &gt;…&lt;/wsdl20:operation&gt;
(17)     …
(18)   &lt;/wsdl20:binding&gt;

(19)   &lt;wsdl20:service name="RealTimeDataService"
(20)        interface="tns:RealTimeDataInterface" &gt;
(21)     &lt;wsdl20:endpoint name="RealTimeDataPort" 
(22)          binding="tns:SecureBinding"&gt;
(23)       &lt;wsp:PolicyReference URI="#common" /&gt;
(24)       …
(25)     &lt;/wsdl20:endpoint&gt;
(26)   &lt;/wsdl20:service&gt;
(27) …
(28) &lt;/wsdl20:description&gt;</eg>
</example>
<p>The <code>SecureBinding</code> WSDL binding description describes a binding for
                    an interface that provides real-time quotes and book information on securities.
                    (The prefixes <code>wsdl20</code> and <code>tns</code> are used here to denote
                    the Web Services Description Language 2.0 XML Namespace and the target namespace
                    of this WSDL document respectively.) To require the use of security for these
                  offerings, a <termref def="policy_expression">policy expression</termref> that requires the use of either transport-level
                  or message-level security is attached to the binding description. The <termref def="policy_expression">policy expression</termref>
                   applies to any message exchange associated with any
                    <code>endpoint</code> that supports this binding description.</p>
<p>The <code>RealTimeDataPort</code> WSDL endpoint description describes an endpoint
                    that supports the <code>SecureBinding</code> WSDL binding description. To
                    require the use of addressing and allow the use of optimization (Optimized MIME
                  Serialization as defined in the MTOM specification [<bibref ref="MTOM"/>]), a <termref def="policy_expression">policy expression</termref> that
                    represents the addressing requirement and optimization capability is attached to
                  the endpoint description. The <termref def="policy_expression">policy expression</termref> applies to any message exchange
                    associated with the <code>RealTimeDataPort</code> endpoint.</p>
<p>In the above example, the <code>#secure</code> and <code>#common</code>
<termref def="policy_expression">policy expressions</termref>
               attached to the <code>SecureBinding</code> WSDL binding and
                        <code>RealTimeDataPort</code> WSDL endpoint descriptions collectively apply
                    to any message exchange associated with the RealTimeDataPort endpoint. The
                    example below represents the combination of these two <termref def="policy">policies</termref>, that is, the
                <termref def="effective_policy">effective policy</termref> for the <code>RealTimeDataPort</code> endpoint.</p>
<example id="table-wsdl20-effective-policy-example">
<head>Effective Policy for the RealTimeDataPort endpoint</head>
<eg xml:space="preserve">(01) &lt;wsp:Policy&gt;
(02)   &lt;wsp:All&gt;
(03)     &lt;wsp:Policy&gt;
(04)       &lt;mtom:OptimizedMimeSerialization wsp:Optional="true"/&gt;
(05)       &lt;wsap:UsingAddressing /&gt;
(06)     &lt;/wsp:Policy&gt;
(07)     &lt;wsp:Policy&gt;
(08)       &lt;wsp:ExactlyOne&gt;
(09)         &lt;sp:TransportBinding&gt;…&lt;/sp:TransportBinding&gt;
(10)         &lt;sp:AsymmetricBinding&gt;…&lt;/sp:AsymmetricBinding &gt;
(11)       &lt;/wsp:ExactlyOne&gt;
(12)     &lt;/wsp:Policy&gt;
(13)   &lt;/wsp:All&gt;
(14) &lt;/wsp:Policy&gt;</eg>
</example>
</div2>
<div2 id="attaching-policy-expressions">
<head>Attaching Policy Expressions</head>
<p>Policy attachment points in a WSDL 2.0 document are:</p>
<ulist>
<item>
<p>
<code>wsdl20:service</code>
</p>
</item>
<item>
<p>
<code>wsdl20:endpoint</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:operation</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:fault</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:operation/wsdl20:input</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:operation/wsdl20:output</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:operation/wsdl20:infault</code>
</p>
</item>
<item>
<p>
<code>wsdl20:binding/wsdl20:operation/wsdl20:outfault</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:operation</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:fault</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:operation/wsdl20:input</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:operation/wsdl20:output</code>
</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:operation/wsdl20:infault</code> and</p>
</item>
<item>
<p>
<code>wsdl20:interface/wsdl20:operation/wsdl20:outfault.</code>
</p>
</item>
</ulist>
<p>Any of these elements <rfc2119>MAY</rfc2119> have one or more <code>wsp:Policy</code> or
                        <code>wsp:PolicyReference</code> child elements.</p>
<p>Policy attachment points in a WSDL document are associated with specific <termref def="policy_subject">policy subjects</termref>
                  as described in the table below. There are four <termref def="policy_subject">policy subjects</termref> in
                    WSDL: the service policy subject, the endpoint policy subject, the operation
                    policy subject and the message policy subject. When a <termref def="policy_expression">policy expression</termref> is
                  attached to a <termref def="policy_subject">policy subject</termref> in a WSDL document, capabilities and requirements
                  represented by the <termref def="policy_expression">policy expression</termref> apply to any message exchange or message
                  associated with (or described by) the <termref def="policy_subject">policy subject</termref>.</p>
<table id="association-of-policy-attachment-points-with-policy-subjects" border="1" cellspacing="0" cellpadding="5">
<caption>Association of Policy Attachment Points with Policy Subjects</caption>
<thead>
<tr>
<th rowspan="1" colspan="1">Policy Attachment Point in a WSDL document</th>
<th rowspan="1" colspan="1">WSDL Component</th>
<th rowspan="1" colspan="1">Policy Subject</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:service</code>
</td>
<td rowspan="1" colspan="1">Service</td>
<td rowspan="1" colspan="1">Service</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:endpoint</code>
</td>
<td rowspan="1" colspan="1">Endpoint</td>
<td rowspan="3" colspan="1">Endpoint</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding</code>
</td>
<td rowspan="1" colspan="1">Binding</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface</code>
</td>
<td rowspan="1" colspan="1">Interface</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:operation</code>
</td>
<td rowspan="1" colspan="1">Binding Operation</td>
<td rowspan="2" colspan="1">Operation</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:operation</code>
</td>
<td rowspan="1" colspan="1">Interface Operation</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:operation/ wsdl20:input</code>
</td>
<td rowspan="1" colspan="1">Binding Message Reference </td>
<td rowspan="2" colspan="1">Message for an input message</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:operation/wsdl20:input</code>
</td>
<td rowspan="1" colspan="1">Interface Message Reference whose {direction} property is
                              ‘in’</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:operation/ wsdl20:output</code>
</td>
<td rowspan="1" colspan="1">Binding Message Reference </td>
<td rowspan="2" colspan="1">Message for an output message</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:operation/ wsdl20:output</code>
</td>
<td rowspan="1" colspan="1">Interface Message Reference whose {direction} property is
                              ‘out’</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:fault</code>
</td>
<td rowspan="1" colspan="1">Binding Fault</td>
<td rowspan="4" colspan="1">Message for an input fault message</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:operation/ wsdl20:infault</code>
</td>
<td rowspan="1" colspan="1">Binding Fault Reference</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:fault</code>
</td>
<td rowspan="1" colspan="1">Interface Fault</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:operation/wsdl20:infault</code>
</td>
<td rowspan="1" colspan="1">Interface Fault Reference whose {direction} property is
                              ‘in’</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:fault</code>
</td>
<td rowspan="1" colspan="1">Binding Fault</td>
<td rowspan="4" colspan="1">Message for an output fault message</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:binding/wsdl20:operation/wsdl20:outfault</code>
</td>
<td rowspan="1" colspan="1">Binding Fault Reference</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:fault</code>
</td>
<td rowspan="1" colspan="1">Interface Fault</td>
</tr>
<tr>
<td rowspan="1" colspan="1">
<code>wsdl20:interface/wsdl20:operation/wsdl20:outfault</code>
</td>
<td rowspan="1" colspan="1">Interface Fault Reference whose {direction} property is
                              ‘out’</td>
</tr>
</tbody>
</table>
<p>For a WSDL component, the attached <termref def="policy">policy</termref> (extension to the WSDL component model
                is described in <specref ref="extension-to-wsdl-component-model"/>) is
                considered an intrinsic part of the WSDL component definition and applies to all
                uses of that definition. For example, when attached to a WSDL Interface
                component, capabilities and requirements represented by a <termref def="policy">policy</termref> apply to all
                the use of this WSDL Interface description. When attached to a WSDL Binding
                component, capabilities and requirements represented by a <termref def="policy">policy</termref> apply to all
                the Endpoints that support this binding description.</p>
<p>A <termref def="policy">policy</termref> associated with a service policy subject applies to any message exchange
                (that is explicitly described by the Interface component in the Service
                component's {interface} property) using any of the endpoints offered by that
                service. </p>
<p>
<termref def="policy">Policies</termref> associated with an endpoint policy subject apply to any message exchange
                (that is explicitly described by the Interface component in the Service
                component’s {interface} property of the Endpoint component’s {parent} property)
                made using that endpoint. Given that a WSDL Interface component may be used by
                one or more binding descriptions, it is <rfc2119>RECOMMENDED</rfc2119> that only a <termref def="policy">policy</termref>
                containing <termref def="policy_assertion">policy assertions</termref> that apply to any possible binding description
                should be attached.</p>
<p>
<termref def="policy">Policies</termref> associated with an operation policy subject apply to the message
                exchange described by that operation. Given that a WSDL Interface Operation
                component may be used by one or more binding descriptions, it is <rfc2119>RECOMMENDED</rfc2119>
                that only a <termref def="policy">policy</termref> containing <termref def="policy_assertion">policy assertions</termref> that apply to any possible
                binding description should be attached.</p>
<p>
<termref def="policy">Policies</termref> associated with a message policy subject apply to that message (input,
                output or fault). Given that a WSDL Interface Message Reference, Interface
                Fault, Interface Fault Reference components may be used by one or more binding
                descriptions, it is <rfc2119>RECOMMENDED</rfc2119> that only a <termref def="policy">policy</termref> containing <termref def="policy_assertion">policy assertions</termref>
                    that apply to any possible binding should be attached.</p>
<p>
<termref def="policy">Policies</termref>
<rfc2119>MAY</rfc2119> be attached at different levels of the WSDL component hierarchy. A
                message exchange with an endpoint <rfc2119>MAY</rfc2119> be described by the <termref def="policy">policies</termref> in all four
                <termref def="policy_subject">policy subjects</termref> simultaneously.</p>
<p>The common mechanism of associating a <termref def="policy_expression">policy expression</termref> with a <termref def="policy_subject">policy subject</termref> is
                to attach a reference to the <termref def="policy_expression">policy expression</termref> to the <termref def="policy_subject">policy subject</termref>. As
                described in the WS-Policy specification [<bibref ref="WS-Policy"/>], a reference to a <termref def="policy_expression">policy expression</termref> is
                    represented using the <code>wsp:PolicyReference</code> element. A policy attachment
                    to a WSDL element is represented by attaching a <code>wsp:PolicyReference</code>
                    element as a child element of the WSDL element.</p>
<p>
<termref def="policy_expression">Policy expressions</termref> can be included within a WSDL document or may reside external
                to a WSDL document. If including <termref def="policy_expression">policy expressions</termref> with a WSDL document is the
                    chosen approach, it is <rfc2119>RECOMMENDED</rfc2119> that the <code>wsp:Policy</code> elements are
                    included as children of the <code>wsdl20:description</code> element after the
                        <code>wsdl20:types</code> element and referenced using the
                        <code>wsp:PolicyReference</code> elements.</p>
<p>To mandate the processing of a <termref def="policy_expression">policy expression</termref> attached to a policy attachment
                    point in a WSDL document, the expression <rfc2119>MUST</rfc2119> be marked as required using the
                        <code>@wsdl20:required</code> flag.</p>
<p>If the <code>wsp:Policy</code> elements are included as children of the
                        <code>wsdl20:description</code> element, these Policy elements <rfc2119>MUST NOT</rfc2119> be
                    marked as required using the <code>@wsdl20:required</code>. (Note: these
                  <termref def="policy_expression">policy expressions</termref> may be included as children of the <code>wsdl20:description</code>
                    element and may not be attached to any policy attachment point in a WSDL
                    document.)</p>
</div2>
<div2 id="extension-to-wsdl-component-model">
<head>Extension to WSDL Component Model</head>
<p>This document adds an optional {policy} property to the following WSDL
                    components:</p>
<ulist>
<item>
<p>Service</p>
</item>
<item>
<p>Endpoint</p>
</item>
<item>
<p>Binding</p>
</item>
<item>
<p>Binding Operation</p>
</item>
<item>
<p>Binding Fault</p>
</item>
<item>
<p>Binding Message Reference</p>
</item>
<item>
<p>Binding Fault Reference</p>
</item>
<item>
<p>Interface</p>
</item>
<item>
<p>Interface Operation</p>
</item>
<item>
<p>Interface Fault</p>
</item>
<item>
<p>Interface Message Reference</p>
</item>
<item>
<p>Interface Fault Reference</p>
</item>
</ulist>
<p>The {policy} property, when present, represents the capabilities and requirements
                  as a <termref def="policy">policy</termref>. The value of the {policy} property is a <termref def="policy">policy</termref> as defined by
                    Section 3 - Policy Model in the WS-Policy specification [<bibref ref="WS-Policy"/>]. The following table
                    describes the mapping from XML representation to the {policy} property.</p>
<table border="1" cellspacing="0" cellpadding="5" id="mapping-from-xml-representation-to-policy-property">
<caption>Mapping from XML representation to the {policy} property</caption>
<thead>
<tr>
<th rowspan="1" colspan="1">Component</th>
<th rowspan="1" colspan="1">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="1" colspan="1">Service</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the <code>wsdl20:service</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Endpoint</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the <code>wsdl20:endpoint</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Binding</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the <code>wsdl20:binding</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Binding Operation</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:binding/wsdl20:operation</code> element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Binding Fault</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:binding/wsdl20:fault</code> element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Binding Message Reference</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:binding/wsdl20:operation/wsdl20:input</code> or
                                        <code>wsdl20:binding/wsdl20:operation/wsdl20:output</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Binding Fault Reference</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:binding/wsdl20:operation/wsdl20:infault</code>
                                    or <code>wsdl20:binding/wsdl20:operation/wsdl20:outfault</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Interface</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the <code>wsdl20:interface</code>
                                    element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Interface Operation</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:interface/wsdl20:operation</code> element, if
                                    any.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Interface Fault</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                        <code>wsdl20:interface/wsdl20:fault</code> element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Interface Message Reference</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                                        <code>wsp:PolicyReference</code> elements, if any, in the
                                        <code>[children]</code> of the
                                  <code>wsdl20:interface/wsdl20:operation/wsdl20:input</code>
                                  or <code>wsdl20:interface/wsdl20:operation/wsdl20:output</code>
                                  element.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">Interface Fault Reference</td>
<td rowspan="1" colspan="1">A <termref def="policy">policy</termref> corresponding to the <termref def="merge">merge</termref> of <code>wsp:Policy</code> or
                              <code>wsp:PolicyReference</code> elements, if any, in the
                              <code>[children]</code> of the
                              <code>wsdl20:interface/wsdl20:operation/wsdl20:infault</code>
                              or
                              <code>wsdl20:interface/wsdl20:operation/wsdl20:outfault</code>
                              element.</td>
</tr>
</tbody>
</table>
 <p>
   Two {policy} properties are equivalent when they represent policies that 
   contain the same number of <termref def="policy_alternative">policy alternatives</termref>, 
   and each <termref def="policy_alternative">policy alternative</termref> in the first policy 
   is equivalent to some <termref def="policy_alternative">policy alternative</termref> 
   in the second policy, and conversely.
 </p>
  <p>
    Two <termref def="policy_alternative">policy alternatives</termref> are 
    equivalent when each <termref def="policy_assertion">policy assertion</termref> 
    in the first <termref def="policy_alternative">policy alternative</termref> is  
    equivalent to some <termref def="policy_assertion">policy assertion</termref> 
    in the second <termref def="policy_alternative">policy alternative</termref>, and conversely.  
    If either <termref def="policy_alternative">policy alternative</termref> 
    contains multiple <termref def="policy_assertion">policy assertions</termref> of 
    the same type, <termref def="policy_alternative">policy alternative</termref>
    equality is dependent on the semantics of that assertion type.
  </p>
  <p>
    Two <termref def="policy_assertion">policy assertions</termref> are equivalent 
    if they have the same QName, if either policy assertion is an <termref def="ignorable_policy_assertion">ignorable policy assertion</termref>,
    both assertions must be <termref def="ignorable_policy_assertion">ignorable policy assertions</termref> 
    and, if either <termref def="policy_assertion">policy assertion</termref> 
    has a nested policy, both assertions must have a 
    nested policy and the nested policies must be equal.  If either assertion 
    contains policy assertion parameters, then the policy assertion parameters 
    SHOULD be compared for equality.  Comparing policy assertion parameters 
    for equality is not defined by this document, but <termref def="policy_assertion">policy assertion</termref> 
    equality may be further refined by the corresponding <termref def="policy_assertion">policy assertion</termref> 
    specification.
  </p>
  
</div2>
<div2 id="effective-policy">
<head>Effective Policy</head>
<p>The following diagram illustrates the four <termref def="policy_subject">policy subjects</termref> in WSDL and how the
              <termref def="effective_policy">effective policy</termref> is calculated for each of these <termref def="policy_subject">policy subjects</termref>.</p>
<p>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" alt="Policy Subjects and Effective Policy in WSDL 2.0" source="ws-policyattachment-4-wsdl20.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
</p>
<p>If multiple <termref def="policy">policies</termref> are attached to WSDL components that collectively represent
              a <termref def="policy_subject">policy subject</termref> then the 
              <termref def="effective_policy">effective policy</termref> of these <termref def="policy">policies</termref> applies. (For
              example, there is a <termref def="policy">policy</termref> attached to an Endpoint component that describes the
              component and there is a <termref def="policy">policy</termref> attached to the Binding component in the
              Endpoint component’s {binding} property.) The <termref def="effective_policy">effective policy</termref> is the <termref def="merge">merge</termref> of
              the <termref def="policy">policies</termref> that are attached to the same <termref def="policy_subject">policy subject</termref>. The rest of this
              section describes how the <termref def="effective_policy">effective policy</termref> is calculated for each of these
              <termref def="policy_subject">policy subjects</termref>.</p>
<div3 id="service-policy-subject">
<head>Service Policy Subject</head>
<p>The <termref def="effective_policy">effective policy</termref> of a service policy subject is the <termref def="policy">policy</termref> in the
                {policy} property of a Service component that describes the service.</p>
</div3>
<div3 id="endpoint-policy-subject">
<head>Endpoint Policy Subject</head>
<p>The <termref def="effective_policy">effective policy</termref> of an endpoint policy subject is the <termref def="merge">merge</termref> of <termref def="policy">policies</termref>
                in the {policy} properties of:</p>
<ulist>
<item>
<p>An Endpoint component that describes the endpoint,</p>
</item>
<item>
<p>The Binding component in the Endpoint component’s {binding} property, </p>
</item>
<item>
<p>The Interface component in the Service component’s {interface}
                  property of the Endpoint component’s {parent} property and</p>
</item>
<item>
<p>The Interface components in the {extended interfaces} property of the
                  Interface component in the Service component’s {interface} property of
                  the Endpoint component’s {parent} property.</p>
</item>
</ulist>
</div3>
<div3 id="operation-policy-subject">
<head>Operation Policy Subject</head>
<p>If the Binding component has an Interface component in the {interface}
                property, then the <termref def="effective_policy">effective policy</termref> of an operation policy subject <rfc2119>MAY</rfc2119> be
                calculated by <termref def="merge">merging</termref> the <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Operation component that describes the operation and</p>
</item>
<item>
<p>The Binding Operation component (if any) whose {interface operation}
                  property has the Interface Operation component.</p>
</item>
</ulist>
<p>If the Binding component does not have an Interface component in the
                {interface} property, then the <termref def="effective_policy">effective policy</termref> of an operation policy
                subject <rfc2119>MUST</rfc2119> be calculated in relation to a specific endpoint, and is the
                <termref def="policy">policy</termref> in the {policy} property of the Interface Operation component that
                describes the operation. </p>
</div3>
<div3 id="message-policy-subject-input">
<head>Message Policy Subject (input message)</head>
<p>If the Binding component has an Interface component in the {interface}
                property, then the <termref def="effective_policy">effective policy</termref> of an input message <rfc2119>MAY</rfc2119> be calculated by
                <termref def="merge">merging</termref> the <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Message Reference component that describes the input
                  message and</p>
</item>
<item>
<p>The Binding Message Reference component whose {interface message
                  reference} property has the Interface Message Reference
                  component.</p>
</item>
</ulist>
<p>If the Binding component does not have an Interface component in the
                {interface} property, then the <termref def="effective_policy">effective policy</termref> of an input message <rfc2119>MUST</rfc2119> be
                calculated in relation to a specific endpoint, and is the <termref def="policy">policy</termref> in the
                {policy} property of the Interface Message Reference component that
                describes the input message.</p>
</div3>
<div3 id="message-policy-subject-output">
<head>Message Policy Subject (output message)</head>
<p>If the Binding component has an Interface component in the {interface}
                property, then the <termref def="effective_policy">effective policy</termref> of an output message <rfc2119>MAY</rfc2119> be calculated
                by <termref def="merge">merging</termref> the <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Message Reference component that describes the output
                            message and</p>
</item>
<item>
<p>The Binding Message Reference component whose {interface message
                            reference} property has the Interface Message Reference
                        component.</p>
</item>
</ulist>
<p>If the Binding component does not have an Interface component in the
                        {interface} property, then the effective policy of an output message <rfc2119>MUST</rfc2119> be
                      calculated in relation to a specific endpoint, and is the <termref def="policy">policy</termref> in the
                        {policy} property of the Interface Message Reference component that
                        describes the output message.</p>
</div3>
<div3 id="message-policy-subject-input-fault">
<head>Message Policy Subject (input fault message)</head>
<p>If the Binding component has an Interface component in the {interface}
                      property, then the <termref def="effective_policy">effective policy</termref> of an input fault message <rfc2119>MAY</rfc2119> be
                      calculated by <termref def="merge">merging</termref> the <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Fault Reference component that describes the input fault
                            message, </p>
</item>
<item>
<p>The Interface Fault component in the Interface Fault Reference
                            component’s {interface fault} property, </p>
</item>
<item>
<p>The Binding Fault Reference component whose {interface fault
                            reference} property has the Interface Fault Reference component and</p>
</item>
<item>
<p>The Binding Fault component whose {interface fault} property has the
                            Interface Fault component in the Interface Fault Reference component’s
                            {interface fault} property.</p>
</item>
</ulist>
<p>If the Binding component does not have an Interface component in the
                      {interface} property, then the <termref def="effective_policy">effective policy</termref> of an input fault message
                      <rfc2119>MUST</rfc2119> be calculated in relation to a specific endpoint, and is the <termref def="merge">merge</termref> of
                      <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Fault Reference component that describes the input fault
                            message and</p>
</item>
<item>
<p>The Interface Fault component in the Interface Fault Reference
                            component’s {interface fault} property.</p>
</item>
</ulist>
</div3>
<div3 id="message-policy-subject-output-fault">
<head>Message Policy Subject (output fault message)</head>
<p>If the Binding component has an Interface component in the {interface}
                      property, then the <termref def="effective_policy">effective policy</termref> of an output fault message <rfc2119>MAY</rfc2119> be
                      calculated by <termref def="merge">merging</termref> the <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Fault Reference component that describes the output
                            fault message,</p>
</item>
<item>
<p>The Interface Fault component in the Interface Fault Reference
                            component’s {interface fault} property, </p>
</item>
<item>
<p>The Binding Fault Reference component whose {interface fault
                            reference} property has the Interface Fault Reference component and</p>
</item>
<item>
<p>The Binding Fault component whose {interface fault} property has the
                            Interface Fault component in the Interface Fault Reference component’s
                            {interface fault} property for the endpoint.</p>
</item>
</ulist>
<p>If the Binding component does not have an Interface component in the
                      {interface} property, then the <termref def="effective_policy">effective policy</termref> of an output fault message
                      <rfc2119>MUST</rfc2119> be calculated in relation to a specific endpoint, and is the <termref def="merge">merge</termref> of
                      <termref def="policy">policies</termref> in the {policy} properties of:</p>
<ulist>
<item>
<p>The Interface Fault Reference component that describes the output
                            fault message and</p>
</item>
<item>
<p>The Interface Fault component in the Interface Fault Reference
                            component’s {interface fault} property.</p>
</item>
</ulist>
</div3>
</div2>
</div1>
<div1 id="AttachingPoliciesUsingUDDI">
<head>Attaching Policies Using UDDI</head>
<p>This section defines a mechanism for associating policies with
<termref def="policy_subject">policy subjects</termref> through the use of UDDI. It defines a minimum level of
support for associating <termref def="policy_expression">policy expressions</termref> with entities in a UDDI
registry. The calculation of <termref def="effective_policy">effective policy</termref> for UDDI entities is
described in Section <specref ref="CalculatingEffectivePolicyElementPolicyUDDI"/>. While the general
concept for associating <termref def="policy_expression">policy expressions</termref> with UDDI entities, which
is specified in Sections <specref ref="ReferencingRemotePolicyExpressions"/> and <specref ref="RegisteringReusablePolicyExpressions"/>, is based on UDDI Version 2 [<bibref ref="UDDIAPI20"/>, <bibref ref="UDDIDataStructure20"/>], the necessary
changes with respect to UDDI Version 3 [<bibref ref="UDDI30"/>] are
explained in Section <specref ref="RegisteringPoliciesUDDIVersion3"/>.</p>
<p>There are essentially two approaches for registering policies in
UDDI. One approach is to directly reference remotely accessible <termref def="policy_expression">policy
expressions</termref> in UDDI entities, the other is to register <termref def="policy_expression">policy
expressions</termref> as distinct tModels and then reference these tModels in
each UDDI entity that is using the <termref def="policy_expression">policy expression</termref>. While the former
approach (see Section <specref ref="ReferencingRemotePolicyExpressions"/>) is expected to be used for
<termref def="policy_expression">policy expressions</termref> that are mainly unique for a given Web service, the
latter approach (see Section <specref ref="RegisteringReusablePolicyExpressions"/>) is expected to be used
for more modular and reusable <termref def="policy_expression">policy expressions</termref>.</p>
<div2 id="CalculatingEffectivePolicyElementPolicyUDDI">
<head>Calculating Effective Policy and Element Policy in UDDI</head>
<p>When attaching a <termref def="policy">policy</termref> to a UDDI entity a <termref def="policy_scope">policy scope</termref> is implied
for that attachment. The <termref def="policy_scope">policy scope</termref> only contains the <termref def="policy_subject">policy
subjects</termref> associated with that entity, and not those associated with
the children of that entity. This <termref def="policy">policy</termref> is the entity's <termref def="element_policy">element
policy</termref>.</p>
<p>Each <termref def="policy_assertion">policy assertion</termref> contained within a UDDI entity's <termref def="element_policy">element
policy</termref> should have the correct semantic such that the policy subject for that
assertion is that UDDI entity. For example, assertions that describe
behaviours regarding a service provider should only be contained
within policies attached to a businessEntity structure.</p>
<p>For UDDI tModels that represent Web service types, the <termref def="element_policy">element
policy</termref> is considered an intrinsic part of the tModel and applies to
all uses of that tModel. In particular, it <rfc2119>MUST</rfc2119> be
<termref def="merge">merged</termref> into the <termref def="effective_policy">effective policy</termref> of every bindingTemplate
that references that tModel.</p>
<p>Policies that apply to deployed Web services (bindingTemplates) are
only considered in the <termref def="effective_policy">effective policy</termref> of that deployed resource
itself.</p>
<p>Each of these entities <rfc2119>MAY</rfc2119> have an <termref def="element_policy">element
policy</termref> per Section <specref ref="rPolicyAttachment"/>. The remainder of
this section defines how that <termref def="element_policy">element policy</termref> is interpreted to
calculate the <termref def="effective_policy">effective policy</termref>.</p>
<div3 id="ServiceProviderPolicySubjectUDDI">
<head>Service Provider Policy Subject</head>
<p>The following UDDI element is considered as the service provider policy subject:</p>
<ulist>
<item>
<p>
<el>uddi:businessEntity</el>
</p>
</item>
</ulist>
<p>This element <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per
Section <specref ref="rPolicyAttachment"/>, and if present
<rfc2119>MUST</rfc2119> be <termref def="merge">merged</termref> into the <termref def="effective_policy">effective policy</termref> of the
UDDI businessEntity Subject.</p>
<p>Policy attached to the service provider policy subject applies to
behaviors or aspects of the service provider as a whole, irrespective
of interactions over any particular service. This includes — but
is not limited to — acting as a service consumer or a service
provider in general. </p>
</div3>
<div3 id="ServicePolicySubjectUDDI">
<head>Service Policy Subject</head>
<p>The following UDDI element is considered as the service policy subject:</p>
<ulist>
<item>
<p>
<el>uddi:businessService</el>
</p>
</item>
</ulist>
<p>This element <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per Section <specref ref="rPolicyAttachment"/>, and if present <rfc2119>MUST</rfc2119> be
<termref def="merge">merged</termref> into the <termref def="effective_policy">effective
policy</termref> of the UDDI businessService Subject.</p>
<p>Policy attached to the service policy subject applies to behaviors
or aspects of the service as a whole, irrespective of interactions
over any particular endpoint. This includes — but is not limited
to — acting as a consumer or a provider of the service.</p>
</div3>
<div3 id="EndpointPolicySubjectUDDI">
<head>Endpoint Policy Subject</head>
<p>The following UDDI elements collectively describe an endpoint:</p>
<ulist>
<item>
<p>
<el>uddi:bindingTemplate</el>
</p>
</item>
<item>
<p>
<el>uddi:tModel</el>
</p>
</item>
</ulist>
<p>These elements <rfc2119>MAY</rfc2119> have <termref def="element_policy">element policy</termref> as per
Section <specref ref="rPolicyAttachment"/>. The <termref def="policy_scope">policy scope</termref> implied by
each of these elements contains the endpoint policy subject
representing the deployed endpoint.</p>
<p>An endpoint policy subject applies to behaviours associated with an
entire endpoint of the service, irrespective of any message exchange
made. This includes — but is not limited to — aspects of
communicating with or instantiating the endpoint.</p>
<p>The <termref def="effective_policy">effective policy</termref> for a UDDI endpoint includes the <termref def="element_policy">element
policy</termref> of the <el>uddi:bindingTemplate</el> element that defines the
endpoint <termref def="merge">merged</termref> with the <termref def="element_policy">element policy</termref> of those
<el>uddi:tModel</el> elements that are referenced in contained
<el>uddi:tModelInstanceInfo</el> elements.</p>
</div3>
</div2>
<div2 id="ReferencingRemotePolicyExpressions">
<head>Referencing Remote Policy Expressions</head>
<p>UDDI tModels provide a generic mechanism for associating arbitrary
metadata with services and other entities in a UDDI registry. To
properly integrate Web Services Policy into the UDDI model, Web Services Policy 1.5 - Attachment
pre-defines one tModel that is used to associate a remotely accessible
<termref def="policy">policy</termref> with an entity in a UDDI registry.</p>
<p>This new tModel is called the remote policy reference category
system and is defined in Appendix <specref ref="RemotePolicyReferenceCategorySystem"/>.</p>
<p>UDDI registries <rfc2119>MUST</rfc2119> use the (UDDI V2 [<bibref ref="UDDIDataStructure20"/>]) <att>tModelKey</att>
<code>uuid:a27078e4-fd38-320a-806f-6749e84f8005</code> to uniquely identify this
tModel so that UDDI registry users can expect the same behavior across
different UDDI registries.</p>
<p>The tModel's valid values are those IRIs that identify external
<termref def="policy_expression">policy expressions</termref>; that is, when referencing this category system in
a <el>categoryBag</el>, the corresponding <att>keyValue</att> of the <el>keyedReference</el> is the
IRI of the <termref def="policy_expression">policy expression</termref>.</p>
<p>Using the remote policy reference category system, one can then
associate a <termref def="policy_expression">policy expression</termref> with a <el>businessEntity</el>, a
<el>businessService</el>, and a tModel using the entity's <el>categoryBag</el>. For
example, associating the <termref def="policy_expression">policy expression</termref> that is identified by the
IRI <code>http://www.example.com/myservice/policy</code> with a <el>businessService</el> is
done as follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;businessService serviceKey="…" &gt;
  &lt;name&gt;…&lt;/name&gt;
  &lt;description&gt;…&lt;/description&gt;
  &lt;bindingTemplates&gt;…&lt;/bindingTemplates&gt;
  &lt;categoryBag&gt;
    &lt;keyedReference
       keyName="Policy Expression for example's Web services"
       keyValue="http://www.example.com/myservice/policy"
       tModelKey="uuid:a27078e4-fd38-320a-806f-6749e84f8005" /&gt;
  &lt;/categoryBag&gt;
&lt;/businessService&gt;</eg>
<p>The <att>tModelKey</att> of the <el>keyedReference</el>
<rfc2119>MUST</rfc2119> match
the fixed <att>tModelKey</att> from the remote policy reference category
system. The <att>keyValue</att>
<rfc2119>MUST</rfc2119> be the IRI that
identifies the <termref def="policy_expression">policy expression</termref>.</p>
<p>A different approach has to be taken to associate a <termref def="policy_expression">policy
expression</termref> with a <el>bindingTemplate</el>, since bindingTemplates do not
contain a <el>categoryBag</el> in UDDI Version 2. Therefore, the
<el>bindingTemplate</el>'s <el>tModelInstanceInfo</el> and <el>instanceParms</el>
<rfc2119>MUST</rfc2119> be used as follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;bindingTemplate bindingKey="…" &gt;
  &lt;accessPoint&gt;…&lt;/accessPoint&gt;
  &lt;tModelInstanceDetails&gt;
    &lt;tModelInstanceInfo
       tModelKey="uuid:a27078e4-fd38-320a-806f-6749e84f8005" &gt;
      &lt;instanceDetails&gt;
        &lt;instanceParms&gt;
          http://www.example.com/myservice/policy
        &lt;/instanceParms&gt;
      &lt;/instanceDetails&gt;
    &lt;/tModelInstanceInfo&gt;
  &lt;/tModelInstanceDetails&gt;
&lt;/bindingTemplate&gt;</eg>
<p>The <att>tModelKey</att> of the <el>tModelInstanceInfo</el>
<rfc2119>MUST</rfc2119>
match the fixed <att>tModelKey</att> from the remote policy reference category
system as defined above. The <el>instanceParms</el>
<rfc2119>MUST</rfc2119> be
the IRI that identifies the <termref def="policy_expression">policy expression</termref>.</p>
</div2>
<div2 id="RegisteringReusablePolicyExpressions">
<head>Registering Reusable Policy Expressions</head>
<p>In addition to using the approach outlined in the section above,
publishers may register a specific <termref def="policy_expression">policy expression</termref> in a UDDI
registry as a distinct tModel. To properly categorize tModels as
<termref def="policy_expression">policy expressions</termref>, Web Services Policy 1.5 - Attachment pre-defines the Web Services Policy
Types category system as a tModel. This tModel is defined in Appendix
<specref ref="WS-PolicyTypesCategorySystem"/>.</p>
<p>The following illustrates a tModel for the <termref def="policy_expression">policy expression</termref>
identified by the IRI
<code>http://www.example.com/myservice/policy</code>.</p>
<eg xml:space="preserve" role="needs-numbering">&lt;tModel tModelKey="uuid:04cfa…"&gt;
  &lt;name&gt;…&lt;/name&gt;
  &lt;description xml:lang="EN"&gt;
    Policy Expression for example's Web services
  &lt;/description&gt;
  &lt;overviewDoc&gt;
    &lt;description xml:lang="EN"&gt;Web Services Policy Expression&lt;/description&gt;
    &lt;overviewURL&gt;http://www.example.com/myservice/policy&lt;/overviewURL&gt;
  &lt;/overviewDoc&gt;
  &lt;categoryBag&gt;
    &lt;keyedReference
       keyName="Reusable policy Expression"
       keyValue="policy"
       tModelKey="uuid:fa1d77dc-edf0-3a84-a99a-5972e434e993" /&gt;
    &lt;keyedReference
       keyName="Policy Expression for example's Web services"
       keyValue="http://www.example.com/myservice/policy"
       tModelKey="uuid:a27078e4-fd38-320a-806f-6749e84f8005" /&gt;
  &lt;/categoryBag&gt;
&lt;/tModel&gt;</eg>
<p>The first <el>keyedReference</el> specifies that the tModel represents a
<termref def="policy_expression">policy expression</termref> — rather than only being associated with one
— by using the Web Services Policy Types category system's built-in
category <code>"policy"</code>, which is its single valid value. This is necessary
in order to enable UDDI inquiries for <termref def="policy_expression">policy expressions</termref> in
general. The second <el>keyedReference</el> designates the <termref def="policy_expression">policy expression</termref>
the tModel represents by using the approach from the section
above. This is necessary in order to enable UDDI inquiries for
particular <termref def="policy_expression">policy expressions</termref> based on their IRI.</p>
<p>Note that the <termref def="policy_expression">policy expression</termref> IRI is also specified in the
tModel's overview URL to indicate that it is a resolvable URL to
actually retrieve the <termref def="policy_expression">policy expression</termref>.</p>
<p>Web Services Policy 1.5 - Attachment pre-defines another tModel that is used to
associate such a pre-registered, locally available <termref def="policy_expression">policy expressions</termref>
with an entity in a UDDI registry</p>
<p>This new tModel is called the local policy reference category
system and is defined in Appendix <specref ref="LocalPolicyReferenceCategorySystem"/>.</p>
<p>UDDI registries <rfc2119>MUST</rfc2119> use the <att>tModelKey</att>
<code>uuid:a27f7d45-ec90-31f7-a655-efe91433527c</code> to uniquely identify this
tModel so that UDDI registry users can expect the same behavior across
different UDDI registries.</p>
<p>The local policy reference category system is based on
tModelKeys. The valid values of this category system are those
tModelKeys identifying tModels that</p>
<ulist>
<item>
<p>exist in the same UDDI registry</p>
</item>
<item>
<p>and are categorized as <code>"policy"</code> using the Web Services Policy Types category system.</p>
</item>
</ulist>
<p>That is, when referencing this category system in a category bag,
the corresponding <att>keyValue</att> of the <el>keyedReference</el> is the <att>tModelKey</att> of
the tModel that represents the <termref def="policy_expression">policy expression</termref>.</p>
<p>Given the local policy reference category system, one can then
associate a <termref def="policy_expression">policy expression</termref> tModel with a <el>businessEntity</el>, a
<el>businessService</el>, and a tModel using the entity's <el>categoryBag</el>. For
example, associating the <termref def="policy_expression">policy expression</termref> tModel with the <att>tModelKey</att>
<code>"uuid:04cfa…"</code> from above with a <el>businessService</el> is done as
follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;businessService serviceKey="…" &gt;
  &lt;name&gt;…&lt;/name&gt;
  &lt;description&gt;…&lt;/description&gt;
  &lt;bindingTemplates&gt;…&lt;/bindingTemplates&gt;
  &lt;categoryBag&gt;
    &lt;keyedReference
       keyName="Policy Expression for example's Web services"
       keyValue="uuid:04cfa…"
       tModelKey="uuid:a27f7d45-ec90-31f7-a655-efe91433527c" /&gt;
  &lt;/categoryBag&gt;
&lt;/businessService&gt;</eg>
<p>The <att>tModelKey</att> of the <el>keyedReference</el>
<rfc2119>MUST</rfc2119> match
the fixed <att>tModelKey</att> from the local policy reference category
system. The keyValue <rfc2119>MUST</rfc2119> be the <att>tModelKey</att> of the
<termref def="policy_expression">policy expression</termref> that is registered with the UDDI registry.</p>
<p>A different approach has to be taken to associate a <termref def="policy_expression">policy
expression</termref> with a <el>bindingTemplate</el>, since bindingTemplates do not
contain a <el>categoryBag</el> in UDDI Version 2. Therefore, the
<el>bindingTemplate</el>'s <el>tModelInstanceInfo</el> and <el>instanceParms</el>
<rfc2119>MUST</rfc2119> be used as follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;bindingTemplate bindingKey="…" &gt;
  &lt;accessPoint&gt;…&lt;/accessPoint&gt;
  &lt;tModelInstanceDetails&gt;
    &lt;tModelInstanceInfo
       tModelKey="uuid:a27f7d45-ec90-31f7-a655-efe91433527c" &gt;
      &lt;instanceDetails&gt;
        &lt;instanceParms&gt;uuid:04cfa…&lt;/instanceParms&gt;
      &lt;/instanceDetails&gt;
    &lt;/tModelInstanceInfo&gt;
  &lt;/tModelInstanceDetails&gt;
&lt;/bindingTemplate&gt;</eg>
<p>The tModelKey of the <el>tModelInstanceInfo</el>
<rfc2119>MUST</rfc2119> match the fixed <att>tModelKey</att> from the
local policy reference category system. The <el>instanceParms</el>
<rfc2119>MUST</rfc2119> be the <att>tModelKey</att> of the <termref def="policy_expression">policy
expression</termref> that is registered with the UDDI registry.</p>
</div2>
<div2 id="RegisteringPoliciesUDDIVersion3">
<head>Registering Policies in UDDI Version 3</head>
<p>UDDI Version 3 [<bibref ref="UDDI30"/>] provides a number of
enhancements in the areas of modeling and entity keying. Special
considerations for UDDI multi-version support are outlined in chapter
10 of [<bibref ref="UDDI30"/>]. The changes with respect to the
previous sections are as follows.</p>
<p>First, the tModelKeys of the pre-defined tModels are migrated to
domain-based keys. The migration is unique since the Version 2 keys
introduced in this specification are already programmatically derived
from the Version 3 keys given below.</p>
<p>The <att>tModelKey</att> for the remote policy reference tModel changes
from
<code>"uuid:a27078e4-fd38-320a-806f-6749e84f8005"</code> to
<code>"uddi:schemas.xmlsoap.org:remotepolicyreference:2003_03"</code>.</p>
<p>The <att>tModelKey</att> for the Web Services Policy Types tModel changes from <code>"uuid:fa1d77dc-edf0-3a84-a99a-5972e434e993"</code> to <code>"uddi:schemas.xmlsoap.org:policytypes:2003_03"</code>.</p>
<p>The <att>tModelKey</att> for the local policy reference tModel changes from <code>"uuid:a27f7d45-ec90-31f7-a655-efe91433527c"</code> to <code>"uddi:schemas.xmlsoap.org:localpolicyreference:2003_03"</code>.</p>
<p>Second, rather than putting <termref def="policy_expression">policy expression</termref> references in a
<el>bindingTemplate</el>'s <el>tModelInstanceInfo</el>, they are added to the
<el>bindingTemplate</el>'s <el>categoryBag</el>, analogous to the mechanism described
for other UDDI entities. For example, the example <el>bindingTemplate</el> from
section <specref ref="CalculatingEffectivePolicyElementPolicyUDDI"/> would be
changed as follows: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;bindingTemplate bindingKey="…" &gt;
  &lt;accessPoint&gt;…&lt;/accessPoint&gt;
  &lt;tModelInstanceDetails&gt;…&lt;/tModelInstanceDetails&gt;
  &lt;categoryBag&gt;
    &lt;keyedReference
       keyName="Policy Expression for example's Web services"
       keyValue="http://www.example.com/myservice/policy"
       tModelKey="uddi:schemas.xmlsoap.org:remotepolicyreference:2003_03"
    /&gt;
  &lt;/categoryBag&gt;
&lt;/bindingTemplate&gt;</eg>
<p>Third, inquiries for reusable <termref def="policy_expression">policy expression</termref> tModels
  described in Section <specref ref="RegisteringReusablePolicyExpressions"/> and UDDI
tModel entities that are associated with remote <termref def="policy_expression">policy expression</termref> is enhanced
by the wildcard mechanism for keyValues in keyedReferences. For
example, searching for all <termref def="policy_expression">policy expression</termref> tModels whose IRI starts
with <code>http://www.example.com/</code>, the following <code>find_tModel</code> API call can
be used: </p>
<eg xml:space="preserve" role="needs-numbering">&lt;find_tModel 
        xmlns="urn:uddi-org:api_v3" &gt;
  &lt;categoryBag&gt;
    &lt;keyedReference
       keyValue="http://www.example.com/"
       tModelKey="uddi:schemas.xmlsoap.org:remotepolicyreference:2003_03"
    /&gt;
  &lt;/categoryBag&gt;
  &lt;findQualifiers&gt;
    &lt;findQualifier&gt;approximateMatch&lt;/findQualifier&gt;
  &lt;/findQualifiers&gt;
&lt;/find_tModel&gt;</eg>
<p>Fourth, all UDDI entities may be digitally signed using XML digital
signatures [<bibref ref="XML-Signature"/>]. Publishers who want to
digitally sign their <termref def="policy_expression">policy expression</termref> tModels or <termref def="policy_expression">policy expression</termref>
references in UDDI <rfc2119>MUST</rfc2119> use the Schema-centric
canonicalization algorithm [<bibref ref="SCC14N"/>].</p>
</div2>
</di