- From: Arthur Ryman via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 23 Mar 2005 03:40:11 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/wsdl20 In directory hutz:/tmp/cvs-serv30750 Modified Files: wsdl20-z.html wsdl20.pdf wsdl20.html wsdl20-primer.html wsdl20-z-ie.html wsdl20.tex wsdl20-primer.xml wsdl20-adjuncts.html Log Message: Added section "Import mechanism and authoring style" to primer. Index: wsdl20-adjuncts.html =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-adjuncts.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wsdl20-adjuncts.html 21 Mar 2005 18:32:52 -0000 1.6 --- wsdl20-adjuncts.html 23 Mar 2005 03:40:09 -0000 1.7 *************** *** 1,15 **** ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ! <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> ! <head> ! <meta name="generator" content= ! "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" /> ! <meta http-equiv="Content-Type" content= ! "text/html; charset=utf-8" /> ! <title>Web Services Description Language (WSDL) Version 2.0 Part 2: ! Adjuncts</title> [...9538 lines suppressed...] ! <td rowspan="1" colspan="1">JJM</td> ! <td rowspan="1" colspan="1">Simplified the introduction; referred to Part1 for a longer introduction</td> ! </tr> ! <tr> ! <td rowspan="1" colspan="1">20020221</td> ! <td rowspan="1" colspan="1">JJM</td> ! <td rowspan="1" colspan="1">Renamed to "Part 2: Bindings"</td> ! </tr> ! <tr> ! <td rowspan="1" colspan="1">20020221</td> ! <td rowspan="1" colspan="1">JJM</td> ! <td rowspan="1" colspan="1">Created from http://www.w3.org/TR/2001/NOTE-wsdl-20010315</td> ! </tr> ! </tbody> ! </table><br> ! </div> ! </div> ! </div> ! </body></html> \ No newline at end of file Index: wsdl20.pdf =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20.pdf,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** wsdl20.pdf 21 Mar 2005 02:33:23 -0000 1.23 --- wsdl20.pdf 23 Mar 2005 03:40:08 -0000 1.24 *************** *** 825,832 **** stream xڝVKo6W@% DRϜEu큱[-93C"Y-X|<H{1qK2^2j7e&ِ,2aysД9)b܌nvܻj'& wD9<O'&iYZ&A 1ia^+u¿Bt6V`Ѭ} ! 4w - #_-F[k 2ÒYo֗Aę?k94>5|4A&S/-uUS!b,2"'X_XI$#zB\"Ky &Lw ! ӱ*РRJ"f7.+?gya͖RH%! qKGv4glٴ'4@gP&l̫^NzeN2"7Xzs1l-:}V&U 9GRsQg4vve!ˑ"a]5;o*hܵSʝ=)P!(92Q9\ȬXJr7;RA!j醦ҪkW\Z!hn֖<iFjG6Cln'^I3;" ! Rgi1k{PIʊ^A&rZ05L(Xy:ら_Lw^ 4FΜx4~qߐ,̝w]&gBWr_NۃA|L HKb#uŚ;ިJA5 =Me~&MfjJ8TǠHm'ɿC$6endstream endobj 550 0 obj << --- 825,831 ---- stream [...6573 lines suppressed...] ! 0000689028 00000 n ! 0000693475 00000 n ! 0000693450 00000 n ! 0000697301 00000 n ! 0000697275 00000 n 0000707946 00000 n 0000707688 00000 n *************** *** 18554,18558 **** /Root 2631 0 R /Info 2632 0 R ! /ID [<74320C044F90190204DAD3A1EC928603> <74320C044F90190204DAD3A1EC928603>] >> startxref --- 18570,18574 ---- /Root 2631 0 R /Info 2632 0 R ! /ID [<6237F35B6F64041798EB26E9EBDE9B74> <6237F35B6F64041798EB26E9EBDE9B74>] >> startxref Index: wsdl20-primer.xml =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-primer.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wsdl20-primer.xml 17 Mar 2005 01:52:35 -0000 1.37 --- wsdl20-primer.xml 23 Mar 2005 03:40:09 -0000 1.38 *************** *** 70,74 **** <p>Section 3 gives more information on defining message types.</p><p>Section 4 gives more information on interfaces.</p><p>Section 5 gives more information on bindings.</p><p>Section 6 gives more information on defining services.</p> ! <p>Section 7 covers various advanced topics, including features and properties, flexible authoring styles, service references, use of URIs, etc. </p> </div2><div2 id="notation"> --- 70,74 ---- <p>Section 3 gives more information on defining message types.</p><p>Section 4 gives more information on interfaces.</p><p>Section 5 gives more information on bindings.</p><p>Section 6 gives more information on defining services.</p> ! <p>Section 5 covers various advanced topics, including features and properties, flexible authoring styles, service references, use of URIs, etc. </p> </div2><div2 id="notation"> *************** *** 1270,1274 **** --- 1270,1417 ---- </div2><div2 id="adv-import-and-authoring"> <head>Import mechanism and authoring style</head> + <ednote> + <name>Arthur</name> + <date>20050322</date> + <edtext>Here is my input for the import mechanism. Please edit. I put the complete WSDL and XSD files in the Test Suite + in test case CreditCardFaults-1G. See http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/good/CreditCardFaults-1G/</edtext> + </ednote> + <p>[Discuss how WSDL documents should be factored to allow significant components to be reused.]</p> + + <p> + In some circumstances you may want to split up a Web service description into two or more documents. + For example, if a description if getting long or is being worked on by several authors, then it + is convenient to divide it into several parts. + Another very important case is when you expect parts of the description to be reused in several contexts. + Clearly it is undesirable to cut and paste sections of one document into another since that is error prone + and leads to maintenance problems. + More importantly, you may need to reuse components that belong to a namespace that is different than + that of the document you are writing, in which case the rules of WSDL 2.0 prevent you from simply cutting and pasting them + into your document. + To solve this problem, + WSDL 2.0 provides two mechanisms for modularizing Web service description documents: import and include. + This section discusses the import mechanism and describes some typical cases where it is be used. + </p> + + <p> + The import mechanism lets you refer to the definitions of Web service components that belong to other namespaces. + To illustrate this, consider the hotel reservation service. Let's suppose that the reservation service uses a + standard credit card validation service that is provided by a financial services company. Furthermore, suppose that + companies in the financial services industry decided that it would be useful to report errors in credit card validation + using a common set of faults. These faults are defined in the following Web service description: + </p> + + <example id="credit-card-faults"> + <head>Standard Credit Card Validation Faults (credit-card-faults.wsdl)</head> + <eg><![CDATA[ + <?xml version="1.0" encoding="utf-8" ?> + <description xmlns="http://www.w3.org/2004/08/wsdl" + targetNamespace="http://finance.example.com/CreditCards/wsdl" + xmlns:tns="http://finance.example.com/CreditCards/wsdl" + xmlns:cc="http://finance.example.com/CreditCards/xsd"> + + <documentation> + This document describes standard faults for use by Web services + that process credit cards. + </documentation> + + <types> + <xs:import xmlns:xs="http://www.w3.org/2001/XMLSchema" + namespace="http://finance.example.com/CreditCardFaults/xsd" + schemaLocation="credit-card-faults.xsd" /> + </types> + + <interface name="creditCardFaults"> + + <fault name="cancelledCreditCard" element="cc:CancelledCreditCard"> + <documentation>Thrown when the credit card has been cancelled.</documentation> + </fault> + + <fault name="expiredCreditCard" element="cc:ExpiredCreditCard"> + <documentation>Thrown when the credit card has expired.</documentation> + </fault> + + <fault name="invalidCreditCardNumber" element="cc:InvalidCreditCardNumber"> + <documentation>Thrown when the credit card number is invalid. + This fault will occur if the wrong credit card type is specified.</documentation> + </fault> + + <fault name="invalidExpirationDate" element="cc:InvalidExpirationDate"> + <documentation>Thrown when the expiration date is invalid.</documentation> + </fault> + + </interface> + + </description>]]></eg> + </example> + + <p> + This example defines an interface, <em>creditCardFaults</em>, that contains four faults, <em>cancelledCreditCard</em>, + <em>expiredCreditCard</em>, <em>invalidCreditCardNumber</em>, and <em>invalidExpirationDate</em>. + These components belong to the namespace <em>http://finance.example.com/CreditCards/wsdl</em>. + The faults are reused in the following hotel reservation service: + </p> + + <example id="use-credit-card-faults"> + <head>Using the Standard Credit Card Validation Faults (use-credit-card-faults.wsdl)</head> + <eg><![CDATA[<?xml version="1.0"?> + <description + targetNamespace="http://greath.example.com/2004/wsdl/resSvc" + xmlns:ghns="http://greath.example.com/2004/schemas/resSvc" + xmlns:cc="http://finance.example.com/CreditCards/wsdl" + xmlns="http://www.w3.org/2004/08/wsdl" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <documentation> + Description: The definition of the reservation Web service of + GreatH hotel. Author: Joe Somebody Date: 05/17/2004 + </documentation> + + <import namespace="http://finance.example.com/CreditCards/wsdl" location="credit-card-faults.wsdl"/> + + . . . + + <interface name="reservation" extends="cc:creditCardFaults"> + + . . . + + <operation name="makeReservation" + pattern="http://www.w3.org/2004/03/wsdl/in-out"> + + <input messageLabel="In" element="ghns:makeReservation" /> + + <output messageLabel="Out" + element="ghns:makeReservationResponse" /> + + <outfault ref="invalidDataFault" messageLabel="Out" /> + + <outfault ref="cc:cancelledCreditCard" messageLabel="Out" /> + <outfault ref="cc:expiredCreditCard" messageLabel="Out" /> + <outfault ref="cc:invalidCreditCardNumber" messageLabel="Out" /> + <outfault ref="cc:invalidExpirationDate" messageLabel="Out" /> + </operation> + </interface> + </description>]]></eg> + </example> + + <p> + The hotel reservation service declares that it is using components from another namespace via the <em>import</em> element. + The import element has a required <em>namespace</em> attribute that specifies the other namespace, and an optional <em>location</em> attribute + that gives the processor a hint where to find the description of the other namespace. + The <em>reservation</em> interface extends the <em>creditCardFault</em> interface from the other namespace in order to make the faults available + in the reservation interface. + Finally, the <em>makeReservation</em> operation refers to the standard faults in its <em>outfault</em> elements. + </p> + + <p> + Another typical situation for using imports is to define a standard interface that is to be implemented + by many services. For example, suppose the hotel industry decided that it was useful to have a standard interface for + making reservations. This interface would belong to some industry association namespace, e.g. http://hotels.example.com/reservations/wsdl. + Each hotel that implemented the standard reservation service + would define a service in its own namespace, e.g. http://greath.example.com/2004/wsdl/resSvc. + The description of each service would import the http://hotels.example.com/reservations/wsdl namespace and refer to the + standard reservation interface in it. + </p> + </div2><div2 id="adv-multiple-docs-describing-same-service"> <head>Multiple Logical WSDL Documents Describing the Same Service</head> Index: wsdl20-primer.html =================================================================== RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-primer.html,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wsdl20-primer.html 17 Mar 2005 01:52:35 -0000 1.21 --- wsdl20-primer.html 23 Mar 2005 03:40:09 -0000 1.22 *************** *** 87,91 **** <p>Section 3 gives more information on defining message types.</p><p>Section 4 gives more information on interfaces.</p><p>Section 5 gives more information on bindings.</p><p>Section 6 gives more information on defining services.</p> ! <p>Section 7 covers various advanced topics, including features and properties, flexible authoring styles, service references, use of URIs, etc. </p> </div><div class="div2"> --- 87,91 ---- <p>Section 3 gives more information on defining message types.</p><p>Section 4 gives more information on interfaces.</p><p>Section 5 gives more information on bindings.</p><p>Section 6 gives more information on defining services.</p> ! <p>Section 5 covers various advanced topics, including features and properties, flexible authoring styles, service references, use of URIs, etc. </p> </div><div class="div2"> *************** *** 1287,1291 **** --- 1287,1430 ---- <h3><a name="adv-import-and-authoring"></a>5.3 Import mechanism and authoring style</h3> + <table border="1" summary="Editorial note: Arthur"><tr><td width="50%" valign="top" align="left"><b>Editorial note: Arthur</b></td><td width="50%" valign="top" align="right">20050322</td></tr><tr><td valign="top" align="left" colspan="2">Here is my input for the import mechanism. Please edit. I put the complete WSDL and XSD files in the Test Suite + in test case CreditCardFaults-1G. See http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/good/CreditCardFaults-1G/</td></tr></table> + <p>[Discuss how WSDL documents should be factored to allow significant components to be reused.]</p> + + <p> + In some circumstances you may want to split up a Web service description into two or more documents. + For example, if a description if getting long or is being worked on by several authors, then it + is convenient to divide it into several parts. + Another very important case is when you expect parts of the description to be reused in several contexts. + Clearly it is undesirable to cut and paste sections of one document into another since that is error prone + and leads to maintenance problems. + More importantly, you may need to reuse components that belong to a namespace that is different than + that of the document you are writing, in which case the rules of WSDL 2.0 prevent you from simply cutting and pasting them + into your document. + To solve this problem, + WSDL 2.0 provides two mechanisms for modularizing Web service description documents: import and include. + This section discusses the import mechanism and describes some typical cases where it is be used. + </p> + + <p> + The import mechanism lets you refer to the definitions of Web service components that belong to other namespaces. + To illustrate this, consider the hotel reservation service. Let's suppose that the reservation service uses a + standard credit card validation service that is provided by a financial services company. Furthermore, suppose that + companies in the financial services industry decided that it would be useful to report errors in credit card validation + using a common set of faults. These faults are defined in the following Web service description: + </p> + + <div class="exampleOuter"> + <p class="exampleHead" style="text-align: left"><a name="credit-card-faults"></a><i><span>Example 5-1. </span>Standard Credit Card Validation Faults (credit-card-faults.wsdl)</i></p> + <div class="exampleInner"><pre> + <?xml version="1.0" encoding="utf-8" ?> + <description xmlns="http://www.w3.org/2004/08/wsdl" + targetNamespace="http://finance.example.com/CreditCards/wsdl" + xmlns:tns="http://finance.example.com/CreditCards/wsdl" + xmlns:cc="http://finance.example.com/CreditCards/xsd"> + + <documentation> + This document describes standard faults for use by Web services + that process credit cards. + </documentation> + + <types> + <xs:import xmlns:xs="http://www.w3.org/2001/XMLSchema" + namespace="http://finance.example.com/CreditCardFaults/xsd" + schemaLocation="credit-card-faults.xsd" /> + </types> + + <interface name="creditCardFaults"> + + <fault name="cancelledCreditCard" element="cc:CancelledCreditCard"> + <documentation>Thrown when the credit card has been cancelled.</documentation> + </fault> + + <fault name="expiredCreditCard" element="cc:ExpiredCreditCard"> + <documentation>Thrown when the credit card has expired.</documentation> + </fault> + + <fault name="invalidCreditCardNumber" element="cc:InvalidCreditCardNumber"> + <documentation>Thrown when the credit card number is invalid. + This fault will occur if the wrong credit card type is specified.</documentation> + </fault> + + <fault name="invalidExpirationDate" element="cc:InvalidExpirationDate"> + <documentation>Thrown when the expiration date is invalid.</documentation> + </fault> + + </interface> + + </description></pre></div> + </div> + + <p> + This example defines an interface, <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">creditCardFaults</em>, that contains four faults, <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">cancelledCreditCard</em>, + <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">expiredCreditCard</em>, <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">invalidCreditCardNumber</em>, and <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">invalidExpirationDate</em>. + These components belong to the namespace <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">http://finance.example.com/CreditCards/wsdl</em>. + The faults are reused in the following hotel reservation service: + </p> + + <div class="exampleOuter"> + <p class="exampleHead" style="text-align: left"><a name="use-credit-card-faults"></a><i><span>Example 5-2. </span>Using the Standard Credit Card Validation Faults (use-credit-card-faults.wsdl)</i></p> + <div class="exampleInner"><pre><?xml version="1.0"?> + <description + targetNamespace="http://greath.example.com/2004/wsdl/resSvc" + xmlns:ghns="http://greath.example.com/2004/schemas/resSvc" + xmlns:cc="http://finance.example.com/CreditCards/wsdl" + xmlns="http://www.w3.org/2004/08/wsdl" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <documentation> + Description: The definition of the reservation Web service of + GreatH hotel. Author: Joe Somebody Date: 05/17/2004 + </documentation> + + <import namespace="http://finance.example.com/CreditCards/wsdl" location="credit-card-faults.wsdl"/> + + . . . + + <interface name="reservation" extends="cc:creditCardFaults"> + + . . . + + <operation name="makeReservation" + pattern="http://www.w3.org/2004/03/wsdl/in-out"> + + <input messageLabel="In" element="ghns:makeReservation" /> + + <output messageLabel="Out" + element="ghns:makeReservationResponse" /> + + <outfault ref="invalidDataFault" messageLabel="Out" /> + + <outfault ref="cc:cancelledCreditCard" messageLabel="Out" /> + <outfault ref="cc:expiredCreditCard" messageLabel="Out" /> + <outfault ref="cc:invalidCreditCardNumber" messageLabel="Out" /> + <outfault ref="cc:invalidExpirationDate" messageLabel="Out" /> + </operation> + </interface> + </description></pre></div> + </div> + + <p> + The hotel reservation service declares that it is using components from another namespace via the <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">import</em> element. + The import element has a required <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">namespace</em> attribute that specifies the other namespace, and an optional <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">location</em> attribute + that gives the processor a hint where to find the description of the other namespace. + The <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">reservation</em> interface extends the <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">creditCardFault</em> interface from the other namespace in order to make the faults available + in the reservation interface. + Finally, the <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">makeReservation</em> operation refers to the standard faults in its <em xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:z="http://www.w3.org/2004/zml">outfault</em> elements. + </p> + + <p> + Another typical situation for using imports is to define a standard interface that is to be implemented + by many services. For example, suppose the hotel industry decided that it was useful to have a standard interface for + making reservations. This interface would belong to some industry association namespace, e.g. http://hotels.example.com/reservations/wsdl. + Each hotel that implemented the standard reservation service + would define a service in its own namespace, e.g. http://greath.example.com/2004/wsdl/resSvc. + The description of each service would import the http://hotels.example.com/reservations/wsdl namespace and refer to the + standard reservation interface in it. + </p> + </div><div class="div2"> *************** *** 1311,1315 **** <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-schema"></a><i><span>Example 5-1. </span>An example XML Schema that contains optimizable elements </i></p> <div class="exampleInner"><pre> --- 1450,1454 ---- <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-schema"></a><i><span>Example 5-3. </span>An example XML Schema that contains optimizable elements </i></p> <div class="exampleInner"><pre> *************** *** 1348,1352 **** <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-soap-message"></a><i><span>Example 5-2. </span>An example of non-optimized soap message that contains embedded binary data </i></p> <div class="exampleInner"><pre> --- 1487,1491 ---- <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-soap-message"></a><i><span>Example 5-4. </span>An example of non-optimized soap message that contains embedded binary data </i></p> <div class="exampleInner"><pre> *************** *** 1382,1386 **** <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-soap-binding"></a><i><span>Example 5-3. </span>Indicating the use of MTOM in wsdl binding</i></p> <div class="exampleInner"><pre> --- 1521,1525 ---- <div class="exampleOuter"> ! <p class="exampleHead" style="text-align: left"><a name="example-MTOM-soap-binding"></a><i><span>Example 5-5. </span>Indicating the use of MTOM in wsdl binding</i></p> <div class="exampleInner"><pre>
Received on Wednesday, 23 March 2005 03:40:13 UTC