- From: Kevin Liu via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 29 Apr 2005 05:37:29 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/wsdl20 In directory hutz:/tmp/cvs-serv29870/ws/desc/wsdl20 Modified Files: wsdl20-primer.html wsdl20-primer.xml Log Message: added component model diagram. reworked on inheritance example to avoid duplicates with advanced topics. some more editings. Index: wsdl20-primer.xml =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-primer.xml,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wsdl20-primer.xml 28 Apr 2005 22:43:07 -0000 1.70 --- wsdl20-primer.xml 29 Apr 2005 05:37:27 -0000 1.71 *************** *** 576,580 **** </div2> ! <div2 id="component-model"><head>WSDL 2.0 Component Model</head><p>The WSDL 2.0 Infoset model above illustrates the required structure of a WSDL 2.0 document, using the XML Infoset. However, the WSDL 2.0 language also imposes many semantic constraints over and above structural conformance to this XML Infoset. In order to precisely describe these constraints, and as an aid in precisely defining the meaning of each WSDL 2.0 document, the WSDL 2.0 specification defines a <emph>component model</emph> as an additional layer of abstraction above the XML Infoset. Constraints and meaning are defined in terms of this component model, and the definition of each component includes a mapping that specifies how values in the component model are derived from corresponding items in the XML Infoset. </p><p>In general, the WSDL 2.0 component model parallels the structure of the required XML Infoset illustrated above. For example, the <emph>Description</emph>, <emph>Interface</emph>, <emph>Binding</emph>, <emph>Servce</emph> and <emph>Endpoint</emph> <emph>components</emph> correspond to the <code>description</code>, <code>interface</code>, <code>binding</code>, <code>service</code>, and <code>endpoint</code> element information items, respectively. Since WSDL 2.0 relies heavily on the component model to convey the meaning of the constructs in the WSDL 2.0 language, you can think of the Description component as representing the meaning of the <code>description</code> element information item, and hence, it represents the meaning of the WSDL 2.0 document as a whole. </p><p>Furthermore, each of these components has <emph>properties</emph> whose values are (usually) derived from the element and attribute information item children of those element information items. For example, the Service component corresponds to the <code>service</code> element information item, so the Service component has an {endpoints} property whose value is a set of Endpoint components corresponding to the <code>endpoint</code> element infomation item children of that <code>service</code> element information item. (Whew!)<ednote><name>dbooth</name><date>2005-04-12</date><edtext>ToDo: Should we add a graphic illustrating the parallel structure of the component model and the XML Infoset? I think it would be helpful.</edtext></ednote></p><p>The WSDL 2.0 component model is particularly helpful in defining the meaning of <code>import</code> and <code>include</code>. WSDL 2.0 <code>include</code> allows components from another WSDL 2.0 document having the same targetNamespace to be merged in with the components of the current WSDL 2.0 document, and is transitive (i.e., if the included document also includes a WSDL 2.0 document, then those components will also be merged, and so on). WSDL 2.0 <code>import</code> allows components from another WSDL 2.0 document having a different targetNamespace to be merged in with comonents of the current WSDL 2.0 document, and is not transitive.</p></div2></div1> --- 576,589 ---- </div2> ! <div2 id="component-model"><head>WSDL 2.0 Component Model</head><p>The WSDL 2.0 Infoset model above illustrates the required structure of a WSDL 2.0 document, using the XML Infoset. However, the WSDL 2.0 language also imposes many semantic constraints over and above structural conformance to this XML Infoset. In order to precisely describe these constraints, and as an aid in precisely defining the meaning of each WSDL 2.0 document, the WSDL 2.0 specification defines a <emph>component model</emph> as an additional layer of abstraction above the XML Infoset. Constraints and meaning are defined in terms of this component model, and the definition of each component includes a mapping that specifies how values in the component model are derived from corresponding items in the XML Infoset. The following diagram gives an overview of the WSDL 2.0 components and their containment hiearchy. ! ! <graphic source="images/WSDL20Components.png" alt="WSDL 2.0 Components Containment Hiearchy"/></p> ! ! ! <p>In general, the WSDL 2.0 component model parallels the structure of the required XML Infoset illustrated above. For example, the <emph>Description</emph>, <emph>Interface</emph>, <emph>Binding</emph>, <emph>Service</emph> and <emph>Endpoint</emph> <emph>components</emph> correspond to the <code>description</code>, <code>interface</code>, <code>binding</code>, <code>service</code>, and <code>endpoint</code> element information items, respectively. Since WSDL 2.0 relies heavily on the component model to convey the meaning of the constructs in the WSDL 2.0 language, you can think of the Description component as representing the meaning of the <code>description</code> element information item, and hence, it represents the meaning of the WSDL 2.0 document as a whole. </p><p>Furthermore, each of these components has <emph>properties</emph> whose values are (usually) derived from the element and attribute information item children of those element information items. For example, the Service component orresponds to the <code>service</code> element information item, so the Service component has an {endpoints} property whose value is a set of Endpoint components corresponding to the <code>endpoint</code> element information item children of that <code>service</code> element information item. (Whew!). ! ! </p> ! ! <p>The WSDL 2.0 component model is particularly helpful in defining the meaning of <code>import</code> and <code>include</code>. WSDL 2.0 <code>include</code> allows components from another WSDL 2.0 document having the same targetNamespace to be merged in with the components of the current WSDL 2.0 document, and is transitive (i.e., if the included document also includes a WSDL 2.0 document, then those components will also be merged, and so on). WSDL 2.0 <code>import</code> allows components from another WSDL 2.0 document having a different targetNamespace to be merged in with comonents of the current WSDL 2.0 document, and is not transitive.</p></div2></div1> *************** *** 647,651 **** </example> </div2> ! <div2 id="more-types-import-include-summary"><head>Summary of Import and Include Mechanisms</head><p>The following table summarizes the similarities and differences between the <code>wsdl:</code> and <code>xs:</code> <code>include</code> and <code>import</code> mechanisms.<table border="1"><caption>Summary of Import and Include Mechanisms</caption><thead><tr><th>Mechanism</th><th>Imported/Included Document Type</th><th>Meaning</th><th>Transitive?</th></tr></thead><tbody><tr><td>wsdl:import</td><td>WSDL 2.0 document</td><td>Merge Interface, Binding and Service components from another WSDL 2.0 document that has a DIFFERENT targetNamespace. (Schema type and element declarations are NOT merged.)</td><td>No</td></tr><tr><td>wsdl:include</td><td>WSDL 2.0 document</td><td>Merge Interface, Binding and Service components from another WSDL 2.0 document that has the SAME targetNamespace. (Schema type and element declarations are NOT merged.)</td><td>Yes</td></tr><tr><td>xs::import</td><td>XML Schema document</td<td>Merge type and element declarations from another XML Schema document that has a DIFFERENT targetNamespace.</td><td>No</td></tr><tr><td>xs:import</td><td>XML Schema document</td><td>Merge type and element declarations from another XML Schema document that has the SAME targetNamespace.</td><td>Yes</td></tr></tbody></table></p></div2> --- 656,663 ---- </example> </div2> ! <div2 id="more-types-import-include-summary"><head>Summary of Import and Include Mechanisms</head><p>The following table summarizes the similarities and differences between the <code>wsdl:</code> and <code>xs:</code> <code>include</code> and <code>import</code> mechanisms.<table border="1"><caption>Summary of Import and Include Mechanisms</caption><thead><tr><th>Mechanism</th><th>Imported/Included Document Type</th><th>Meaning</th><th>Transitive?</th></tr></thead><tbody><tr><td>wsdl:import</td><td>WSDL 2.0 document</td><td>Merge Interface, Binding and Service components from another WSDL 2.0 document that has a DIFFERENT targetNamespace. (Schema type and element declarations are NOT merged.)</td><td>No</td></tr><tr><td>wsdl:include</td><td>WSDL 2.0 document</td><td>Merge Interface, Binding and Service components from another WSDL 2.0 document that has the SAME targetNamespace. (Schema type and element declarations are NOT merged.)</td><td>Yes</td></tr><tr><td>xs::import</td><td>XML Schema document</td<td>Merge type and element declarations from another XML Schema document that has a DIFFERENT targetNamespace.</td><td>No</td></tr><tr><td>xs:import</td><td>XML Schema document</td><td>Merge type and element declarations from another XML Schema document that has the SAME targetNamespace.</td><td>Yes</td></tr></tbody></table></p> ! <p>More advanced topics on importing schemas are discussed in <specref ref="adv-multiple-inline-schemas"/></p> ! ! </div2> *************** *** 707,766 **** <div2 id="more-interfaces-inheritance"> <head>Interface Inheritance</head> ! <p>The optional <att>extends</att> attribute allows an interface to extend or inherit from one or more other interfaces. In such cases the interface contains the operations of the interfaces it extends, along with any operations it defines directly. Two things about extending interfaces deserve some attention. </p><p>First, an inheritance loop (or infinite recursion) is prohibited: the interfaces that a given interface extends MUST NOT themselves extend that interface either directly or indirectly. </p><p>Second, we must explain what happens when operations from two different interfaces have the same target namespace and operation name. There are two cases: either the component models of the operations are the same, or they are different. If the component models are the same (per the component comparison algorithm defined in WSDL 2.0 Part 1 <bibref ref="WSDL-PART1"/> "<xspecref href="http://www.w3.org/TR/wsdl20-primer#compequiv">Equivalence of Components</xspecref>") then they are considered to b the same operation, i.e., they are collapsed into a single operation, and the fact that they were included more than once is not considered an error. (For operations, component equivalence basically means that the two operations have the same set of attributes and descendents.) In the second case, if two operations have the same name in the same WSDL target namespace but are not equivalent, then it is an error. For the above reason, it is considered good practice to ensure that all operations within the same target namespace are named uniquely. </p><p>Finally, since faults, features and properties can also be defined as children of the <code>interface</code> element (as described in the following sections), the same name-collision rules apply to those constructs. In the next section, we will provide an example of leveraging interface inheritance for reusing faults and operations across multiple interfaces.</p> ! <p>Now let's have a look at the element children of <code>interface</code>, beginning with <code>fault</code>. </p> ! ! </div2> ! <div2 id="more-interfaces-faults"> ! <head>Interface Faults</head> ! <p>The <code>fault</code> element is used to declare faults that may occur during execution of operations of an interface. They are declared directly under <code>interface</code>, and referenced from operations where they apply, in order to permit reuse across multiple operations. </p> ! <p>Faults are very similar to messages and can be viewed as a special kind of ! message. Both faults and messages may carry a payload that is normally described ! by an element declaration. However, WSDL treats faults and messages slightly ! differently. The messages of an operation directly refer to their element ! declaration, however the faults of an operation indirectly refer to their ! element declaration via a fault element that is defined on the interface. </p> ! ! <p>The reason for defining faults at ! the interface level is to allow their reuse across multiple operations. This ! design is especially beneficial when bindings are defined, since in binding extensions like ! SOAP there is additional information that is associated with faults. In the case ! of SOAP, faults have codes and subcodes in addition to a payload. By defining ! faults at the interface level, common codes and subcodes can be associated with ! them, thereby ensuring consistency across all operations that use the faults </p> ! ! <p>The <code>fault</code> element has a required <att>name</att> attribute that must be unique within the WSDL document's target namespace, and permits it to be referenced from operation declarations. The optional <att>element</att> attribute can be used to indicate a schema for the content or payload of the fault message. Its value should be the QName of a global element defined in the <code>types</code> section. Please note when other type systems are used to define the schema for a fault message, additional attributes may need to be defined via WSDL's attribute extension mechanism to allow the schema to be associated with the fault.</p> ! <p>The following example shows one way to leverage interface inheritance for reusing faults and operations across multiple interfaces. In most cases, faults are defined under each individual interface like in the initial example @@TODO:Add reference to example 2-1@@. But some system may require a set of standard fault messages to be reused across a system. For example, let's say the GreatH hotel wants to maintain a set of standard fault messages and a standard error log operation for credit card and data validation errors that are reusable across the whole reservation system. One way to meet such requirement is to define the standard faults and the log operation in an interface which can be inherited by other interfaces. </p> <example id="example-faults"> ! <head>Reusable Faults and Interface Inheritance</head> <eg xml:space="preserve"> <description ...> ... ! <interface name = "faultManagementInterface" > ! ! <<b>fault</b> name = "invalidCreditCardFault" ! element = "ghns:invalidCreditCardError"> ! <documentation> ! fault declaration for invalid credit card information. ! </documentation> ! <<b>/fault</b>> ! ! <<b>fault</b> name = "invalidDataFault" ! element = "ghns:invalidDataError"> ! <documentation> ! falut declaration for invalid data. ! </documentation> ! <<b>/fault</b>> ! ! <operation name="opLogError" ! pattern="http://www.w3.org/2004/03/wsdl/in"> ! <input messageLabel="In" ! element="ghns:errorMsg" /> </operation> </interface> ! <interface name="reservationInterface" <b>extends</b>="tns:faultManagementInterface" > <operation name="opCheckAvailability" --- 719,743 ---- <div2 id="more-interfaces-inheritance"> <head>Interface Inheritance</head> ! <p>The optional <att>extends</att> attribute allows an interface to extend or inherit from one or more other interfaces. In such cases the interface contains the operations of the interfaces it extends, along with any operations it defines directly. Two things about extending interfaces deserve some attention. </p><p>First, an inheritance loop (or infinite recursion) is prohibited: the interfaces that a given interface extends MUST NOT themselves extend that interface either directly or indirectly. </p><p>Second, we must explain what happens when operations from two different interfaces have the same target namespace and operation name. There are two cases: either the component models of the operations are the same, or they are different. If the component models are the same (per the component comparison algorithm defined in WSDL 2.0 Part 1 <bibref ref="WSDL-PART1"/> "<xspecref href="http://www.w3.org/TR/wsdl20-primer#compequiv">Equivalence of Components</xspecref>") then they are considered to b the same operation, i.e., they are collapsed into a single operation, and the fact that they were included more than once is not considered an error. (For operations, component equivalence basically means that the two operations have the same set of attributes and descendents.) In the second case, if two operations have the same name in the same WSDL target namespace but are not equivalent, then it is an error. For the above reason, it is considered good practice to ensure that all operations within the same target namespace are named uniquely. </p><p>Finally, since faults, features and properties can also be defined as children of the <code>interface</code> element (as described in the following sections), the same name-collision rules apply to those constructs. </p> ! ! <p>Let's say the GreatH hotel wants to maintain a a standard message log operation for all received messages. It wants this operation to be reusable across the whole reservation system, so each service will send out, for potential use of a logging service, the content of of each message it receives together with a timestamp and the originator of the message. One way to meet such requirement is to define the log operation in an interface which can be inherited by other interfaces. Assuming a <code>messageLog</code> element is already defined in the ghns namespace with the required content, the inheritance use case is illustrated in the following example. As a result of the inheritance, the <code>reservationInterface</code> now contains two operations: <code>opCheckAvailability</code> and <code>opLogMessage</code></p> <example id="example-faults"> ! <head>Interface Inheritance</head> <eg xml:space="preserve"> <description ...> ... ! <interface name = "messageLogInterface" > ! ! <operation name="opLogMessage" ! pattern="http://www.w3.org/2004/03/wsdl/out"> ! <output messageLabel="out" ! element="ghns:messageLog" /> </operation> </interface> ! <interface name="reservationInterface" <b>extends</b>="tns:messageLogInterface" > <operation name="opCheckAvailability" *************** *** 778,782 **** ... </description></eg> ! </example> </div2> --- 755,783 ---- ... </description></eg> ! </example> ! ! <p>Now let's have a look at the element children of <code>interface</code>, beginning with <code>fault</code>. </p> ! ! </div2> ! <div2 id="more-interfaces-faults"> ! <head>Interface Faults</head> ! <p>The <code>fault</code> element is used to declare faults that may occur during execution of operations of an interface. They are declared directly under <code>interface</code>, and referenced from operations where they apply, in order to permit reuse across multiple operations. </p> ! <p>Faults are very similar to messages and can be viewed as a special kind of ! message. Both faults and messages may carry a payload that is normally described ! by an element declaration. However, WSDL treats faults and messages slightly ! differently. The messages of an operation directly refer to their element ! declaration, however the faults of an operation indirectly refer to their ! element declaration via a fault element that is defined on the interface. </p> ! ! <p>The reason for defining faults at ! the interface level is to allow their reuse across multiple operations. This ! design is especially beneficial when bindings are defined, since in binding extensions like ! SOAP there is additional information that is associated with faults. In the case ! of SOAP, faults have codes and subcodes in addition to a payload. By defining ! faults at the interface level, common codes and subcodes can be associated with ! them, thereby ensuring consistency across all operations that use the faults </p> ! ! <p>The <code>fault</code> element has a required <att>name</att> attribute that must be unique within the WSDL document's target namespace, and permits it to be referenced from operation declarations. The optional <att>element</att> attribute can be used to indicate a schema for the content or payload of the fault message. Its value should be the QName of a global element defined in the <code>types</code> section. Please note when other type systems are used to define the schema for a fault message, additional attributes may need to be defined via WSDL's attribute extension mechanism to allow the schema to be associated with the fault.</p> ! </div2> Index: wsdl20-primer.html =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-primer.html,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wsdl20-primer.html 28 Apr 2005 22:43:07 -0000 1.50 --- wsdl20-primer.html 29 Apr 2005 05:37:27 -0000 1.51 *************** *** 94,99 **** <hr><div class="toc"> <h2><a name="shortcontents">Short Table of Contents</a></h2><p class="toc">1. <a href="#Introduction">Introduction</a><br>2. <a href="#basics">WSDL 2.0 Basics</a><br>3. <a href="#wsdl-xml-representation">WSDL 2.0 Infoset, Schema and Component Model</a><br>4. <a href="#more-types">More on Message Types</a><br>5. <a href="#more-interfaces">More on Interfaces</a><br>6. <a href="#more-bindings">More on Bindings</a><br>7. <a href="#advanced-topic_ii">Advanced Topics</a><br>8. <a href="#References">References</a><br></p></div><hr><div class="toc"> ! <h2><a name="contents">Table of Contents</a></h2><p class="toc">1. <a href="#Introduction">Introduction</a><br> 1.1 <a href="#Prerequisites">Prerequisites</a><br> 1.2 <a href="#PrimerStructure">Structure of this Primer</a><br> 1.3 <a href="#notation">Notational Conventions</a><br>2. <a href="#basics">WSDL 2.0 Basics</a><br> 2.1 <a href="#basics-greath-scenario">Example Scenario: The GreatH Hotel Reservation Service</a><br> 2.2 <a href="#basics-getting-started">Getting Started: Defining a WSDL Target Namespace</a><br> 2.2.1 <a href="#example-empty-shell-explanation">Explanation of Example</a><br> 2.3 <a href="#basics-types">Defining Message Types</a><br> 2.3.1 <a href="#example-initial-types-explanation">Explanation of Example</a><br> 2.4 <a href="#basics-nterface">Defining an Interface</a><br> 2.4.1 <a href="#example-initial-interface-explanation">Explanation of Example</a><br> 2.5 <a href="#basics-binding">Defining a Binding</a><br> 2.5.1 <a href="#example-initial-binding-explanation">Explanation of Example</a><br> 2.6 <a href="#basics-service">Defining a Service</a><br> 2.6.1 <a href="#example-initial-service-explanation">Explanation of Example</a><br> 2.7 <a href="#basics-documentation">Documenting the Service</a><br> 2.7.1 <a href="#example-initial-documentation-explanation">Explanation of Example</a><br>3. <a href="#wsdl-xml-representation">WSDL 2.0 Infoset, Schema and Component Model</a><br> 3.1 <a href="#wsdl-infoset-diagram">WSDL 2.0 Infoset</a><br> 3. <a href="#wsdl-schema">WSDL 2.0 Schema and Element Ordering</a><br> 3.3 <a href="#component-model">WSDL 2.0 Component Model</a><br>4. <a href="#more-types">More on Message Types</a><br> 4.1 <a href="#more-types-schema-embed">Embedding XML Schema</a><br> 4.2 <a href="#more-types-schema-import">Importing XML Schema</a><br> 4.3 <a href="#more-types-import-include-summary">Summary of Import and Include Mechanisms</a><br>5. <a href="#more-interfaces">More on Interfaces</a><br> 5.1 <a href="#more-interfaces-interfaces">Interface Syntax </a><br> 5.2 <a href="#more-interfaces-inheritance">Interface Inheritance</a><br> 5.3 <a href="#more-interfaces-faults">Interface Faults</a><br> 5.4 <a href="#more-interfaces-operations">Interface Operations</a><br> 5.4.1 <a href="#more-interfaces-op-att">Operation Attributes</a><br> 5.4.2 <a href="#N108A2">Operation Message References</a><br> 5.4.2.1 <a href="#N108BF">The messageLabel Attribute</a><br> 5.4.2.2 <a href="#N108D3">The element Attribute</a><br> 5.4.2.3 <a href="#N108FA">Multiple infault or outfault Elements</a><br> 5.4.3 <a href="#more-interfaces-meps">Understanding Message Exchange Patterns (MEPs)</a><br> 5.4.4 <a href="#more-interfaces-defining-meps">Defining New Message Exchange Patterns (MEPs)</a><br>6. <a href="#more-bindings">More on Bindings</a><br> 6.1 <a href="#more-bindings-wsdl">Syntax Summary for Bindings</a><br> 6.2 <a href="#more-bindins-reusable">Reusable Bindings</a><br> 6.3 <a href="#more-bindings-faults">Binding Faults</a><br> 6.4 <a href="#bindingOperations">Binding Operations</a><br> 6.5 <a href="#more-bindings-soap">The SOAP Binding Extension</a><br> 6.5.1 <a href="#more-bindings-soap-example-explanation">Explanation of Example</a><br> 6.6 <a href="#more-bindings-http">The HTTP Binding Extension</a><br> 6.6.1 <a href="#N10ABE">Explanation of ! Example</a><br> 6.7 <a href="#adv-get-vs-post">HTTP GET Versus POST: Which to Use?</a><br>7. <a href="#advanced-topic_ii">Advanced Topics</a><br> 7.1 <a href="#adv-extensibility">Extensibility</a><br> 7.1.1 <a href="#adv-optional-versus-required">Optional Versus Required Extensions</a><br> 7.1.2 <a href="#adv-scope-of-wsdl-required">Scoping of the wsdl:required Attribute</a><br> 7.2 <a href="#adv-FP">Features and Properties</a><br> 7.2.1 <a href="#adv-FP-soap-modules">SOAP Modules</a><br> 7.2.2 <a href="#adv-FP-abstract-features">Abstract Features</a><br> 7.2.3 <a href="#adv-fp-properties">Properties</a><br> 7.3 <a href="#adv-import-and-authoring">Import mechanism and authoring stye</a><br> 7.4 <a href="#adv-multiple-docs-describing-same-service">Multiple Interfaces for the Same Service</a><br> 7.5 <a href="#adv-versioning">Web Service Versioning</a><br> 7.5.1 <a href="#adv-versioning-compatible-evolution">Compatible Evolution</a><br> 7.5.2 <a href="#adv-versioning-big-bang">Big Bang</a><br> 7.5.3 <a href="#adv-versioning-combined">Combined Approaches</a><br> 7.6 <a href="#adv-MTOM">MTOM Support</a><br> 7.7 <a href="#adv-RPCstyle">RPC Style</a><br> 7.8 <a href="#adv-message-dispatch">Enabling Easy Message Dispatch</a><br> 7.9 <a href="#adv-service-references">Service References</a><br> 7.9.1 <a href="#reservationDetails">The Reservation Details Web Service</a><br>nbsp; 7.9.2 <a href="#reservationList">The Reservation List Web Service</a><br> 7.9.3 <a href="#reservationDetails_HTTP">Reservation Details Web Service Using HTTP Transfer</a><br> 7.9.4 <a href="#reservationList_HTTP_GET">Reservation List Web Service Using HTTP GET</a><br> 7.10 <a href="#adv-multiple-inline-schemas">Importing Schemas</a><br> 7.10.1 <a href="#N10FCE">Schemas in Imported Documents</a><br> 7.10.2 <a href="#N11059">Multiple Inline Schemas in One Document</a><br> 7.10.3 <a href="#adv-schema-location">The schemaLocation Attribute</a><br> 7.10.3.1 <a href="#N110B6">Using the id Attribute to Identify Inline Schemas</a><br> 7.11 <a href="#adv-rdf-mapping">Mapping to RDF and Semantic Web</a><br> 7.11.1 <a href="#adv-rdf-rep-wsdl">RDF Representation of WSDL 2.0</a><br> 7.12 <a href="#adv-notes-on-uris">Notes on URIs</a><br> 7.12.1 <a href="#adv-namespaces-and-schema-locations">XML Namespaces and Schema Locations</a><br> 7.12.2 <a href="#adv-relative-uris">Relative URIs</a><br> 7.12.3 <a href="#adv-generating-uris">Generating Temporary URIs</a><br>8. <a href="#References">References</a><br> 8.1 <a href="#Normative-References">Normative References</a><br> 8.2 <a href="#Informative-References">Informative References</a><br></p></div><hr><div class="body"> --- 94,99 ---- <hr><div class="toc"> <h2><a name="shortcontents">Short Table of Contents</a></h2><p class="toc">1. <a href="#Introduction">Introduction</a><br>2. <a href="#basics">WSDL 2.0 Basics</a><br>3. <a href="#wsdl-xml-representation">WSDL 2.0 Infoset, Schema and Component Model</a><br>4. <a href="#more-types">More on Message Types</a><br>5. <a href="#more-interfaces">More on Interfaces</a><br>6. <a href="#more-bindings">More on Bindings</a><br>7. <a href="#advanced-topic_ii">Advanced Topics</a><br>8. <a href="#References">References</a><br></p></div><hr><div class="toc"> ! <h2><a name="contents">Table of Contents</a></h2><p class="toc">1. <a href="#Introduction">Introduction</a><br> 1.1 <a href="#Prerequisites">Prerequisites</a><br> 1.2 <a href="#PrimerStructure">Structure of this Primer</a><br> 1.3 <a href="#notation">Notational Conventions</a><br>2. <a href="#basics">WSDL 2.0 Basics</a><br> 2.1 <a href="#basics-greath-scenario">Example Scenario: The GreatH Hotel Reservation Service</a><br> 2.2 <a href="#basics-getting-started">Getting Started: Defining a WSDL Target Namespace</a><br> 2.2.1 <a href="#example-empty-shell-explanation">Explanation of Example</a><br> 2.3 <a href="#basics-types">Defining Message Types</a><br> 2.3.1 <a href="#example-initial-types-explanation">Explanation of Example</a><br> 2.4 <a href="#basics-nterface">Defining an Interface</a><br> 2.4.1 <a href="#example-initial-interface-explanation">Explanation of Example</a><br> 2.5 <a href="#basics-binding">Defining a Binding</a><br> 2.5.1 <a href="#example-initial-binding-explanation">Explanation of Example</a><br> 2.6 <a href="#basics-service">Defining a Service</a><br> 2.6.1 <a href="#example-initial-service-explanation">Explanation of Example</a><br> 2.7 <a href="#basics-documentation">Documenting the Service</a><br> 2.7.1 <a href="#example-initial-documentation-explanation">Explanation of Example</a><br>3. <a href="#wsdl-xml-representation">WSDL 2.0 Infoset, Schema and Component Model</a><br> 3.1 <a href="#wsdl-infoset-diagram">WSDL 2.0 Infoset</a><br> 3. <a href="#wsdl-schema">WSDL 2.0 Schema and Element Ordering</a><br> 3.3 <a href="#component-model">WSDL 2.0 Component Model</a><br>4. <a href="#more-types">More on Message Types</a><br> 4.1 <a href="#more-types-schema-embed">Embedding XML Schema</a><br> 4.2 <a href="#more-types-schema-import">Importing XML Schema</a><br> 4.3 <a href="#more-types-import-include-summary">Summary of Import and Include Mechanisms</a><br>5. <a href="#more-interfaces">More on Interfaces</a><br> 5.1 <a href="#more-interfaces-interfaces">Interface Syntax </a><br> 5.2 <a href="#more-interfaces-inheritance">Interface Inheritance</a><br> 5.3 <a href="#more-interfaces-faults">Interface Faults</a><br> 5.4 <a href="#more-interfaces-operations">Interface Operations</a><br> 5.4.1 <a href="#more-interfaces-op-att">Operation Attributes</a><br> 5.4.2 <a href="#N108A9">Operation Message References</a><br> 5.4.2.1 <a href="#N108C6">The messageLabel Attribute</a><br> 5.4.2.2 <a href="#N108DA">The element Attribute</a><br> 5.4.2.3 <a href="#N10901">Multiple infault or outfault Elements</a><br> 5.4.3 <a href="#more-interfaces-meps">Understanding Message Exchange Patterns (MEPs)</a><br> 5.4.4 <a href="#more-interfaces-defining-meps">Defining New Message Exchange Patterns (MEPs)</a><br>6. <a href="#more-bindings">More on Bindings</a><br> 6.1 <a href="#more-bindings-wsdl">Syntax Summary for Bindings</a><br> 6.2 <a href="#more-bindins-reusable">Reusable Bindings</a><br> 6.3 <a href="#more-bindings-faults">Binding Faults</a><br> 6.4 <a href="#bindingOperations">Binding Operations</a><br> 6.5 <a href="#more-bindings-soap">The SOAP Binding Extension</a><br> 6.5.1 <a href="#more-bindings-soap-example-explanation">Explanation of Example</a><br> 6.6 <a href="#more-bindings-http">The HTTP Binding Extension</a><br> 6.6.1 <a href="#N10AC5">Explanation of ! Example</a><br> 6.7 <a href="#adv-get-vs-post">HTTP GET Versus POST: Which to Use?</a><br>7. <a href="#advanced-topic_ii">Advanced Topics</a><br> 7.1 <a href="#adv-extensibility">Extensibility</a><br> 7.1.1 <a href="#adv-optional-versus-required">Optional Versus Required Extensions</a><br> 7.1.2 <a href="#adv-scope-of-wsdl-required">Scoping of the wsdl:required Attribute</a><br> 7.2 <a href="#adv-FP">Features and Properties</a><br> 7.2.1 <a href="#adv-FP-soap-modules">SOAP Modules</a><br> 7.2.2 <a href="#adv-FP-abstract-features">Abstract Features</a><br> 7.2.3 <a href="#adv-fp-properties">Properties</a><br> 7.3 <a href="#adv-import-and-authoring">Import mechanism and authoring stye</a><br> 7.4 <a href="#adv-multiple-docs-describing-same-service">Multiple Interfaces for the Same Service</a><br> 7.5 <a href="#adv-versioning">Web Service Versioning</a><br> 7.5.1 <a href="#adv-versioning-compatible-evolution">Compatible Evolution</a><br> 7.5.2 <a href="#adv-versioning-big-bang">Big Bang</a><br> 7.5.3 <a href="#adv-versioning-combined">Combined Approaches</a><br> 7.6 <a href="#adv-MTOM">MTOM Support</a><br> 7.7 <a href="#adv-RPCstyle">RPC Style</a><br> 7.8 <a href="#adv-message-dispatch">Enabling Easy Message Dispatch</a><br> 7.9 <a href="#adv-service-references">Service References</a><br> 7.9.1 <a href="#reservationDetails">The Reservation Details Web Service</a><br>nbsp; 7.9.2 <a href="#reservationList">The Reservation List Web Service</a><br> 7.9.3 <a href="#reservationDetails_HTTP">Reservation Details Web Service Using HTTP Transfer</a><br> 7.9.4 <a href="#reservationList_HTTP_GET">Reservation List Web Service Using HTTP GET</a><br> 7.10 <a href="#adv-multiple-inline-schemas">Importing Schemas</a><br> 7.10.1 <a href="#N10FD5">Schemas in Imported Documents</a><br> 7.10.2 <a href="#N11060">Multiple Inline Schemas in One Document</a><br> 7.10.3 <a href="#adv-schema-location">The schemaLocation Attribute</a><br> 7.10.3.1 <a href="#N110BD">Using the id Attribute to Identify Inline Schemas</a><br> 7.11 <a href="#adv-rdf-mapping">Mapping to RDF and Semantic Web</a><br> 7.11.1 <a href="#adv-rdf-rep-wsdl">RDF Representation of WSDL 2.0</a><br> 7.12 <a href="#adv-notes-on-uris">Notes on URIs</a><br> 7.12.1 <a href="#adv-namespaces-and-schema-locations">XML Namespaces and Schema Locations</a><br> 7.12.2 <a href="#adv-relative-uris">Relative URIs</a><br> 7.12.3 <a href="#adv-generating-uris">Generating Temporary URIs</a><br>8. <a href="#References">References</a><br> 8.1 <a href="#Normative-References">Normative References</a><br> 8.2 <a href="#Informative-References">Informative References</a><br></p></div><hr><div class="body"> *************** *** 614,618 **** <div class="div2"> ! <h3><a name="component-model"></a>3.3 WSDL 2.0 Component Model</h3><p>The WSDL 2.0 Infoset model above illustrates the required structure of a WSDL 2.0 document, using the XML Infoset. However, the WSDL 2.0 language also imposes many semantic constraints over and above structural conformance to this XML Infoset. In order to precisely describe these constraints, and as an aid in precisely defining the meaning of each WSDL 2.0 document, the WSDL 2.0 specification defines a <em>component model</em> as an additional layer of abstraction above the XML Infoset. Constraints and meaning are defined in terms of this component model, and the definition of each component includes a mapping that specifies how values in the component model are derived from corresponding items in the XML Infoset. </p><p>In general, the WSDL 2.0 component model parallels the structure of the required XML Infoset illustrated above. For example, the <em>Description</em>, <em>Interface</em>, <em>Binding</em>, <em>Service</em> and <e>Endpoint</em> <em>components</em> correspond to the <code>description</code>, <code>interface</code>, <code>binding</code>, <code>service</code>, and <code>endpoint</code> element information items, respectively. Since WSDL 2.0 relies heavily on the component model to convey the meaning of the constructs in the WSDL 2.0 language, you can think of the Description component as representing the meaning of the <code>description</code> element information item, and hence, it represents the meaning of the WSDL 2.0 document as a whole. </p><p>Furthermore, each of these components has <em>properties</em> whose values are (usually) derived from the element and attribute information item children of those element information items. For example, the Service component corresponds to the <code>service</code> element information item, so the Service component has an {endpoints} property whose value is a set of Endpoint components corresponding to the <code>endpoint</code> element information item children of that<code>service</code> element information item. (Whew!)<table border="1" summary="Editorial note: dbooth"><tr><td width="50%" valign="top" align="left"><b>Editorial note: dbooth</b></td><td width="50%" valign="top" align="right">2005-04-12</td></tr><tr><td valign="top" align="left" colspan="2">ToDo: Should we add a graphic illustrating the parallel structure of the component model and the XML Infoset? I think it would be helpful.</td></tr></table></p><p>The WSDL 2.0 component model is particularly helpful in defining the meaning of <code>import</code> and <code>include</code>. WSDL 2.0 <code>include</code> allows components from another WSDL 2.0 document having the same targetNamespace to be merged in with the components of the current WSDL 2.0 document, and is transitive (i.e., if the included document also includes a WSDL 2.0 document, then those components will also be merged, and so on). WSDL 2.0 <code>import</code> allows components from another WSDL 2.0 document having a different targetNamespace tobe merged in with comonents of the current WSDL 2.0 document, and is not transitive.</p></div></div> --- 614,627 ---- <div class="div2"> ! <h3><a name="component-model"></a>3.3 WSDL 2.0 Component Model</h3><p>The WSDL 2.0 Infoset model above illustrates the required structure of a WSDL 2.0 document, using the XML Infoset. However, the WSDL 2.0 language also imposes many semantic constraints over and above structural conformance to this XML Infoset. In order to precisely describe these constraints, and as an aid in precisely defining the meaning of each WSDL 2.0 document, the WSDL 2.0 specification defines a <em>component model</em> as an additional layer of abstraction above the XML Infoset. Constraints and meaning are defined in terms of this component model, and the definition of each component includes a mapping that specifies how values in the component model are derived from corresponding items in the XML Infoset. The following diagram gives an overview of the WSDL 2.0 components and their containment hiearchy. ! ! <div style="text-align: center" class="figure"><br><img src="images/WSDL20Components.png" alt="WSDL 2.0 Components Containment Hiearchy"><p style="text-align:left"><i><span>Figure 3-2. </span>WSDL 2.0 Components Containment Hiearchy</i></p><br></div></p> ! ! ! <p>In general, the WSDL 2.0 component model parallels the structure of the required XML Infoset illustrated above. For example, the <em>Description</em>, <em>Interface</em>, <em>Binding</em>, <em>Service</em> and <em>Endpoint</em> <em>components</em> correspond to the <code>description</code>, <code>interface</code>, <code>binding</code>, <code>service</code>, and <code>endpoint</code> element information items, respectively. Since WSDL 2.0 relies heavily on the component model to convey the meaning of the constructs in the WSDL 2.0 language, you can think of the Description component as representing the meaning of the <code>description</code> element information item, and hence, it represents the meaning of the WSDL 2.0 document as a whole. </p><p>Furthermore, each of these components has <em>properties</em> whose values are (usually) derived from the element and attribute information item children of those element information items. For example, the Service component corresponds to the <code>serice</code> element information item, so the Service component has an {endpoints} property whose value is a set of Endpoint components corresponding to the <code>endpoint</code> element information item children of that <code>service</code> element information item. (Whew!). ! ! </p> ! ! <p>The WSDL 2.0 component model is particularly helpful in defining the meaning of <code>import</code> and <code>include</code>. WSDL 2.0 <code>include</code> allows components from another WSDL 2.0 document having the same targetNamespace to be merged in with the components of the current WSDL 2.0 document, and is transitive (i.e., if the included document also includes a WSDL 2.0 document, then those components will also be merged, and so on). WSDL 2.0 <code>import</code> allows components from another WSDL 2.0 document having a different targetNamespace to be merged in with comonents of the current WSDL 2.0 document, and is not transitive.</p></div></div> *************** *** 689,693 **** </div> <div class="div2"> ! <h3><a name="more-types-import-include-summary"></a>4.3 Summary of Import and Include Mechanisms</h3><p>The following table summarizes the similarities and differences between the <code>wsdl:</code> and <code>xs:</code> <code>include</code> and <code>import</code> mechanisms.<a name=""></a><br><table border="1"><caption>Table 4-1. Summary of Import and Include Mechanisms</caption><thead><tr><th rowspan="1" colspan="1">Mechanism</th><th rowspan="1" colspan="1">Imported/Included Document Type</th><th rowspan="1" colspan="1">Meaning</th><th rowspan="1" colspan="1">Transitive?</th></tr></thead><tbody><tr><td rowspan="1" colspan="1">wsdl:import</td><td rowspan="1" colspan="1">WSDL 2.0 document</td><td rowspan="1" colspan="1">Merge Interface, Binding and Service components from another WSDL 2.0 document that has a DIFFERENT targetNamespace. (Schema type and element declarations are NOT merged.)</td><td rowspan="1" colspan="1">No</td></tr><tr><td rowspan="1" colspan="1">wsdl:include</td><td rowspan="1" colspan=1">WSDL 2.0 document</td><td rowspan="1" colspan="1">Merge Interface, Binding and Service components from another WSDL 2.0 document that has the SAME targetNamespace. (Schema type and element declarations are NOT merged.)</td><td rowspan="1" colspan="1">Yes</td></tr><tr><td rowspan="1" colspan="1">xs::import</td><td rowspan="1" colspan="1">XML Schema document</td><td rowspan="1" colspan="1">Merge type and element declarations from another XML Schema document that has a DIFFERENT targetNamespace.</td><td rowspan="1" colspan="1">No</td></tr><tr><td rowspan="1" colspan="1">xs:import</td><td rowspan="1" colspan="1">XML Schema document</td><td rowspan="1" colspan="1">Merge type and element declarations from another XML Schema document that has the SAME targetNamespace.</td><td rowspan="1" colspan="1">Yes</td></tr></tbody></table><br></p></div> --- 698,705 ---- </div> <div class="div2"> ! <h3><a name="more-types-import-include-summary"></a>4.3 Summary of Import and Include Mechanisms</h3><p>The following table summarizes the similarities and differences between the <code>wsdl:</code> and <code>xs:</code> <code>include</code> and <code>import</code> mechanisms.<a name=""></a><br><table border="1"><caption>Table 4-1. Summary of Import and Include Mechanisms</caption><thead><tr><th rowspan="1" colspan="1">Mechanism</th><th rowspan="1" colspan="1">Imported/Included Document Type</th><th rowspan="1" colspan="1">Meaning</th><th rowspan="1" colspan="1">Transitive?</th></tr></thead><tbody><tr><td rowspan="1" colspan="1">wsdl:import</td><td rowspan="1" colspan="1">WSDL 2.0 document</td><td rowspan="1" colspan="1">Merge Interface, Binding and Service components from another WSDL 2.0 document that has a DIFFERENT targetNamespace. (Schema type and element declarations are NOT merged.)</td><td rowspan="1" colspan="1">No</td></tr><tr><td rowspan="1" colspan="1">wsdl:include</td><td rowspan="1" colspan=1">WSDL 2.0 document</td><td rowspan="1" colspan="1">Merge Interface, Binding and Service components from another WSDL 2.0 document that has the SAME targetNamespace. (Schema type and element declarations are NOT merged.)</td><td rowspan="1" colspan="1">Yes</td></tr><tr><td rowspan="1" colspan="1">xs::import</td><td rowspan="1" colspan="1">XML Schema document</td><td rowspan="1" colspan="1">Merge type and element declarations from another XML Schema document that has a DIFFERENT targetNamespace.</td><td rowspan="1" colspan="1">No</td></tr><tr><td rowspan="1" colspan="1">xs:import</td><td rowspan="1" colspan="1">XML Schema document</td><td rowspan="1" colspan="1">Merge type and element declarations from another XML Schema document that has the SAME targetNamespace.</td><td rowspan="1" colspan="1">Yes</td></tr></tbody></table><br></p> ! <p>More advanced topics on importing schemas are discussed in <a href="#adv-multiple-inline-schemas"><b>7.10 Importing Schemas</b></a></p> ! ! </div> *************** *** 752,812 **** <h3><a name="more-interfaces-inheritance"></a>5.2 Interface Inheritance</h3> ! <p>The optional <code>extends</code> attribute allows an interface to extend or inherit from one or more other interfaces. In such cases the interface contains the operations of the interfaces it extends, along with any operations it defines directly. Two things about extending interfaces deserve some attention. </p><p>First, an inheritance loop (or infinite recursion) is prohibited: the interfaces that a given interface extends MUST NOT themselves extend that interface either directly or indirectly. </p><p>Second, we must explain what happens when operations from two different interfaces have the same target namespace and operation name. There are two cases: either the component models of the operations are the same, or they are different. If the component models are the same (per the component comparison algorithm defined in WSDL 2.0 Part 1 [<cite><a href="#WSDL-PART1">WSDL 2.0 Core Language</a></cite>] "<a href="http://www.w3.org/TR/wsdl20-primer#compequiv">Equivalence of Components</a>") the they are considered to be the same operation, i.e., they are collapsed into a single operation, and the fact that they were included more than once is not considered an error. (For operations, component equivalence basically means that the two operations have the same set of attributes and descendents.) In the second case, if two operations have the same name in the same WSDL target namespace but are not equivalent, then it is an error. For the above reason, it is considered good practice to ensure that all operations within the same target namespace are named uniquely. </p><p>Finally, since faults, features and properties can also be defined as children of the <code>interface</code> element (as described in the following sections), the same name-collision rules apply to those constructs. In the next section, we will provide an example of leveraging interface inheritance for reusing faults and operations across multiple interfaces.</p> ! <p>Now let's have a look at the element children of <code>interface</code>, beginning with <code>fault</code>. </p> ! ! </div> ! <div class="div2"> ! <h3><a name="more-interfaces-faults"></a>5.3 Interface Faults</h3> ! <p>The <code>fault</code> element is used to declare faults that may occur during execution of operations of an interface. They are declared directly under <code>interface</code>, and referenced from operations where they apply, in order to permit reuse across multiple operations. </p> ! <p>Faults are very similar to messages and can be viewed as a special kind of ! message. Both faults and messages may carry a payload that is normally described ! by an element declaration. However, WSDL treats faults and messages slightly ! differently. The messages of an operation directly refer to their element ! declaration, however the faults of an operation indirectly refer to their ! element declaration via a fault element that is defined on the interface. </p> ! ! <p>The reason for defining faults at ! the interface level is to allow their reuse across multiple operations. This ! design is especially beneficial when bindings are defined, since in binding extensions like ! SOAP there is additional information that is associated with faults. In the case ! of SOAP, faults have codes and subcodes in addition to a payload. By defining ! faults at the interface level, common codes and subcodes can be associated with ! them, thereby ensuring consistency across all operations that use the faults </p> ! ! <p>The <code>fault</code> element has a required <code>name</code> attribute that must be unique within the WSDL document's target namespace, and permits it to be referenced from operation declarations. The optional <code>element</code> attribute can be used to indicate a schema for the content or payload of the fault message. Its value should be the QName of a global element defined in the <code>types</code> section. Please note when other type systems are used to define the schema for a fault message, additional attributes may need to be defined via WSDL's attribute extension mechanism to allow the schema to be associated with the fault.</p> ! <p>The following example shows one way to leverage interface inheritance for reusing faults and operations across multiple interfaces. In most cases, faults are defined under each individual interface like in the initial example @@TODO:Add reference to example 2-1@@. But some system may require a set of standard fault messages to be reused across a system. For example, let's say the GreatH hotel wants to maintain a set of standard fault messages and a standard error log operation for credit card and data validation errors that are reusable across the whole reservation system. One way to meet such requirement is to define the standard faults and the log operation in an interface which can be inherited by other interfaces. </p> <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-faults"></a><i><span>Example 5-1. </span>Reusable Faults and Interface Inheritance</i></p> <div class="exampleInner"><pre> <description ...> ... ! <interface name = "faultManagementInterface" > ! ! <<b>fault</b> name = "invalidCreditCardFault" ! element = "ghns:invalidCreditCardError"> ! <documentation> ! fault declaration for invalid credit card information. ! </documentation> ! <<b>/fault</b>> ! ! <<b>fault</b> name = "invalidDataFault" ! element = "ghns:invalidDataError"> ! <documentation> ! falut declaration for invalid data. ! </documentation> ! <<b>/fault</b>> ! ! <operation name="opLogError" ! pattern="http://www.w3.org/2004/03/wsdl/in"> ! <input messageLabel="In" ! element="ghns:errorMsg" /> </operation> </interface> ! <interface name="reservationInterface" <b>extends</b>="tns:faultManagementInterface" > <operation name="opCheckAvailability" --- 764,788 ---- <h3><a name="more-interfaces-inheritance"></a>5.2 Interface Inheritance</h3> ! <p>The optional <code>extends</code> attribute allows an interface to extend or inherit from one or more other interfaces. In such cases the interface contains the operations of the interfaces it extends, along with any operations it defines directly. Two things about extending interfaces deserve some attention. </p><p>First, an inheritance loop (or infinite recursion) is prohibited: the interfaces that a given interface extends MUST NOT themselves extend that interface either directly or indirectly. </p><p>Second, we must explain what happens when operations from two different interfaces have the same target namespace and operation name. There are two cases: either the component models of the operations are the same, or they are different. If the component models are the same (per the component comparison algorithm defined in WSDL 2.0 Part 1 [<cite><a href="#WSDL-PART1">WSDL 2.0 Core Language</a></cite>] "<a href="http://www.w3.org/TR/wsdl20-primer#compequiv">Equivalence of Components</a>") the they are considered to be the same operation, i.e., they are collapsed into a single operation, and the fact that they were included more than once is not considered an error. (For operations, component equivalence basically means that the two operations have the same set of attributes and descendents.) In the second case, if two operations have the same name in the same WSDL target namespace but are not equivalent, then it is an error. For the above reason, it is considered good practice to ensure that all operations within the same target namespace are named uniquely. </p><p>Finally, since faults, features and properties can also be defined as children of the <code>interface</code> element (as described in the following sections), the same name-collision rules apply to those constructs. </p> ! <p>Let's say the GreatH hotel wants to maintain a a standard message log operation for all received messages. It wants this operation to be reusable across the whole reservation system, so each service will send out, for potential use of a logging service, the content of of each message it receives together with a timestamp and the originator of the message. One way to meet such requirement is to define the log operation in an interface which can be inherited by other interfaces. Assuming a <code>messageLog</code> element is already defined in the ghns namespace with the required content, the inheritance use case is illustrated in the following example. As a result of the inheritance, the <code>reservationInterface</code> now contains two operations: <code>opCheckAvailability</code> and <code>opLogMessage</code></p> <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-faults"></a><i><span>Example 5-1. </span>Interface Inheritance</i></p> <div class="exampleInner"><pre> <description ...> ... ! <interface name = "messageLogInterface" > ! ! <operation name="opLogMessage" ! pattern="http://www.w3.org/2004/03/wsdl/out"> ! <output messageLabel="out" ! element="ghns:messageLog" /> </operation> </interface> ! <interface name="reservationInterface" <b>extends</b>="tns:messageLogInterface" > <operation name="opCheckAvailability" *************** *** 824,828 **** ... </description></pre></div> ! </div> </div> --- 800,829 ---- ... </description></pre></div> ! </div> ! ! <p>Now let's have a look at the element children of <code>interface</code>, beginning with <code>fault</code>. </p> ! ! </div> ! <div class="div2"> ! ! <h3><a name="more-interfaces-faults"></a>5.3 Interface Faults</h3> ! <p>The <code>fault</code> element is used to declare faults that may occur during execution of operations of an interface. They are declared directly under <code>interface</code>, and referenced from operations where they apply, in order to permit reuse across multiple operations. </p> ! <p>Faults are very similar to messages and can be viewed as a special kind of ! message. Both faults and messages may carry a payload that is normally described ! by an element declaration. However, WSDL treats faults and messages slightly ! differently. The messages of an operation directly refer to their element ! declaration, however the faults of an operation indirectly refer to their ! element declaration via a fault element that is defined on the interface. </p> ! ! <p>The reason for defining faults at ! the interface level is to allow their reuse across multiple operations. This ! design is especially beneficial when bindings are defined, since in binding extensions like ! SOAP there is additional information that is associated with faults. In the case ! of SOAP, faults have codes and subcodes in addition to a payload. By defining ! faults at the interface level, common codes and subcodes can be associated with ! them, thereby ensuring consistency across all operations that use the faults </p> ! ! <p>The <code>fault</code> element has a required <code>name</code> attribute that must be unique within the WSDL document's target namespace, and permits it to be referenced from operation declarations. The optional <code>element</code> attribute can be used to indicate a schema for the content or payload of the fault message. Its value should be the QName of a global element defined in the <code>types</code> section. Please note when other type systems are used to define the schema for a fault message, additional attributes may need to be defined via WSDL's attribute extension mechanism to allow the schema to be associated with the fault.</p> ! </div> *************** *** 855,863 **** </li> </ul></div><div class="div3"> ! <h4><a name="N108A2"></a>5.4.2 Operation Message References</h4><p>An <code>operation</code> will also have <code>input</code>, <code>output</code>,<code>infault</code>, and/or <code>outfault</code> element children that specify the ordinary and fault message types to be used by that operation. The MEP specified by the <code>pattern</code> attribute determines which of these elements should be included, since each MEP has placeholders for the message types involved in its pattern. </p><p>Since operations were already discussed in <a href="#basics-interface"><b>2.4 Defining an Interface</b></a>, this section will merely comment on additional capabilities that were not previously explained.</p> <div class="div4"> ! <h5><a name="N108BF"></a>5.4.2.1 The messageLabel Attribute</h5><p>The <code>messageLabel</code> attribute of the <code>input</code> and <code>output</code> elements is optional: it is not necessary to explicitly set the <code>messageLabel</code> when the MEP in use is one of the eight MEPs predefined in WSDL 2.0 Part 2 [<cite><a href="#WSDL-PART2">WSDL 2.0 Adjuncts</a></cite>] and it has only one message with a given direction. </p></div><div class="div4"> ! <h5><a name="N108D3"></a>5.4.2.2 The element Attribute</h5><p>The <code>element</code> attribute of the <code>input</code> and <code>output</code> elements is used to specify the message content schema (a/k/a payload schema) when the content model is defined using XML Schema. As we have seen already, it can specify the QName of an element schema that was defined in the <code>types</code> section. However, alternatively it can specify one of the following tokens: </p><dl><dt class="label"><code>#any</code></dt><dd><p>The message content is any single element.</p></dd><dt class="label"><code>#none</code></dt><dd><p>There is no message content, i.e., the message payload is empty.</p></dd></dl><p>The <code>element</code> attribute is also optional. If it is not specified, then @@@@. <table border="1" summary="Editorial note"><tr><td width="50%" valign="top" align="left"><b>Editorial note</b></td><td width="50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">ToDo: ay what happens if the element attribute is not specified, after issue LC99 is resolved. See http://www.w3.org/2002/ws/desc/4/lc-issues/issues.html#LC99 </td></tr></table></p></div><div class="div4"> ! <h5><a name="N108FA"></a>5.4.2.3 Multiple infault or outfault Elements</h5><p>When <code>infault</code> and/or <code>outfault</code> occur multiple times within an <code>operation</code>, they define alternative fault messages. </p></div></div> --- 856,864 ---- </li> </ul></div><div class="div3"> ! <h4><a name="N108A9"></a>5.4.2 Operation Message References</h4><p>An <code>operation</code> will also have <code>input</code>, <code>output</code>,<code>infault</code>, and/or <code>outfault</code> element children that specify the ordinary and fault message types to be used by that operation. The MEP specified by the <code>pattern</code> attribute determines which of these elements should be included, since each MEP has placeholders for the message types involved in its pattern. </p><p>Since operations were already discussed in <a href="#basics-interface"><b>2.4 Defining an Interface</b></a>, this section will merely comment on additional capabilities that were not previously explained.</p> <div class="div4"> ! <h5><a name="N108C6"></a>5.4.2.1 The messageLabel Attribute</h5><p>The <code>messageLabel</code> attribute of the <code>input</code> and <code>output</code> elements is optional: it is not necessary to explicitly set the <code>messageLabel</code> when the MEP in use is one of the eight MEPs predefined in WSDL 2.0 Part 2 [<cite><a href="#WSDL-PART2">WSDL 2.0 Adjuncts</a></cite>] and it has only one message with a given direction. </p></div><div class="div4"> ! <h5><a name="N108DA"></a>5.4.2.2 The element Attribute</h5><p>The <code>element</code> attribute of the <code>input</code> and <code>output</code> elements is used to specify the message content schema (a/k/a payload schema) when the content model is defined using XML Schema. As we have seen already, it can specify the QName of an element schema that was defined in the <code>types</code> section. However, alternatively it can specify one of the following tokens: </p><dl><dt class="label"><code>#any</code></dt><dd><p>The message content is any single element.</p></dd><dt class="label"><code>#none</code></dt><dd><p>There is no message content, i.e., the message payload is empty.</p></dd></dl><p>The <code>element</code> attribute is also optional. If it is not specified, then @@@@. <table border="1" summary="Editorial note"><tr><td width="50%" valign="top" align="left"><b>Editorial note</b></td><td width="50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">ToDo: ay what happens if the element attribute is not specified, after issue LC99 is resolved. See http://www.w3.org/2002/ws/desc/4/lc-issues/issues.html#LC99 </td></tr></table></p></div><div class="div4"> ! <h5><a name="N10901"></a>5.4.2.3 Multiple infault or outfault Elements</h5><p>When <code>infault</code> and/or <code>outfault</code> occur multiple times within an <code>operation</code>, they define alternative fault messages. </p></div></div> *************** *** 1097,1101 **** </div> <div class="div3"> ! <h4><a name="N10ABE"></a>6.6.1 Explanation of Example</h4><table border="1" summary="Editorial note: dbooth"><tr><td width="50%" valign="top" align="left"><b>Editorial note: dbooth</b></td><td width="50%" valign="top" align="right">2005-04-15</td></tr><tr><td valign="top" align="left" colspan="2">ToDo: Check this section. I'm not sure I got it all right, particularly regarding whttp:location. Is the first sample request URI correct? Shouldn't instance data for tCheckAvailability be in the path component? What happens if a non-leaf element type is specified, such as tCheckAvailability?</td></tr></table><p></p><dl> <dt class="label"><code>type="http://www.w3.org/@@@@/@@/wsdl/http"</code></dt> --- 1098,1102 ---- </div> <div class="div3"> ! <h4><a name="N10AC5"></a>6.6.1 Explanation of Example</h4><table border="1" summary="Editorial note: dbooth"><tr><td width="50%" valign="top" align="left"><b>Editorial note: dbooth</b></td><td width="50%" valign="top" align="right">2005-04-15</td></tr><tr><td valign="top" align="left" colspan="2">ToDo: Check this section. I'm not sure I got it all right, particularly regarding whttp:location. Is the first sample request URI correct? Shouldn't instance data for tCheckAvailability be in the path component? What happens if a non-leaf element type is specified, such as tCheckAvailability?</td></tr></table><p></p><dl> <dt class="label"><code>type="http://www.w3.org/@@@@/@@/wsdl/http"</code></dt> *************** *** 2320,2324 **** <div class="div3"> ! <h4><a name="N10FCE"></a>7.10.1 Schemas in Imported Documents</h4> <p> In this example, we consider some GreatH Hotel --- 2321,2325 ---- <div class="div3"> ! <h4><a name="N10FD5"></a>7.10.1 Schemas in Imported Documents</h4> <p> In this example, we consider some GreatH Hotel *************** *** 2527,2531 **** <div class="div3"> ! <h4><a name="N11059"></a>7.10.2 Multiple Inline Schemas in One Document</h4> <p> A WSDL 2.0 document may define multiple inline --- 2528,2532 ---- <div class="div3"> ! <h4><a name="N11060"></a>7.10.2 Multiple Inline Schemas in One Document</h4> <p> A WSDL 2.0 document may define multiple inline *************** *** 2661,2665 **** the <code>schema</code> element. The simplest way to accomplish this is to use the <code>id</code> attribute, however XPointer can also be used. </p><div class="div4"> ! <h5><a name="N110B6"></a>7.10.3.1 Using the id Attribute to Identify Inline Schemas</h5><p> <a href="#schemaIds.wsdl">Example 7-26</a> --- 2662,2666 ---- the <code>schema</code> element. The simplest way to accomplish this is to use the <code>id</code> attribute, however XPointer can also be used. </p><div class="div4"> ! <h5><a name="N110BD"></a>7.10.3.1 Using the id Attribute to Identify Inline Schemas</h5><p> <a href="#schemaIds.wsdl">Example 7-26</a>
Received on Friday, 29 April 2005 05:37:40 UTC