kapok

          垃圾桶,嘿嘿,我藏的這么深你們還能找到啊,真牛!

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            455 隨筆 :: 0 文章 :: 76 評(píng)論 :: 0 Trackbacks
          http://www-128.ibm.com/developerworks/cn/webservices/ws-uwsdl/part2/index.html
          發(fā)布和查找 WSDL 服務(wù)描述的用法個(gè)案研究

          Peter Brittenham
          資深軟件工程師, IBM 新興技術(shù)
          2001 年 9 月

          如這個(gè)系列的第 1 篇文章說(shuō)明的那樣,“Web 服務(wù)描述語(yǔ)言”(Web Services Description Language(WSDL))的多功能性使得在 UDDI 注冊(cè)中心使用它更加復(fù)雜。在本文,即本系列第 2 部分中,Peter 使用各種 WSDL 用法個(gè)案研究來(lái)實(shí)現(xiàn)將 WSDL 映射到 UDDI 環(huán)境的過(guò)程。

          如本系列的第 1 部分所述(請(qǐng)參閱 參考資料),一個(gè)完整的 WSDL 服務(wù)描述由服務(wù)接口和服務(wù)實(shí)現(xiàn)組成。這些服務(wù)描述中的每一個(gè)都可以駐留在不同的物理 WSDL 文檔中。

          本系列的這一部分包含在“UDDI 注冊(cè)中心”發(fā)布和查找完整的 WSDL 服務(wù)描述的用法個(gè)案研究。對(duì)于每一個(gè)用法個(gè)案研究,我將描述一個(gè)在 UDDI 注冊(cè)中心發(fā)布完整的 WSDL 服務(wù)定義的方法。對(duì)這些方法的描述根據(jù)的是 UDDI 優(yōu)化方法文檔中的過(guò)程以及“UDDI 程序員的 API 規(guī)范”和“UDDI 數(shù)據(jù)結(jié)構(gòu)參考大全”中定義的用法約定(請(qǐng)參閱 參考資料)。

          個(gè)案研究 1:沒(méi)有服務(wù)實(shí)現(xiàn)的服務(wù)接口
          當(dāng)服務(wù)接口提供者將 WSDL 服務(wù)接口定義作為 tModel 發(fā)布時(shí),將可以從任意 UDDI businessService 引用這個(gè) tModel。這個(gè)個(gè)案研究展示如何發(fā)布一個(gè)帶有對(duì) tModel(此 tModel 與 WSDL 服務(wù)接口相關(guān)聯(lián))的引用的 businessService。在這個(gè)個(gè)案研究中,UDDI businessService 與 WSDL 服務(wù)實(shí)現(xiàn)定義無(wú)關(guān)。可以使用 UDDI 優(yōu)化方法文檔中描述的過(guò)程實(shí)現(xiàn)這個(gè)個(gè)案研究。

          WSDL 服務(wù)接口定義
          服務(wù)接口文檔包含所有的 WSDL 類型、message、portType 和 binding 元素。在這個(gè)個(gè)案研究中,Web 服務(wù)包含一個(gè)操作,使用 SOAP 指定綁定。這個(gè)示例并不包括 types 元素,因?yàn)檫@個(gè)用法個(gè)案研究不要求消息的數(shù)據(jù)類型定義。

          清單 1包含一個(gè)簡(jiǎn)單服務(wù)接口文檔示例。突出顯示的域?qū)⒃?UDDI 數(shù)據(jù)實(shí)體中被引用。

          清單 1: 個(gè)案研究 1 簡(jiǎn)單服務(wù)接口文檔
          
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-interface"
            targetNamespace="http://www.getquote.com/StockQuoteService-interface"
            xmlns:tns="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
              Standard WSDL service interface definition for a stock quote service.
            </documentation>
          
            <message name="SingleSymbolRequest">
              <part name="symbol" type="xsd:string"/>
            </message>
          
            <message name="SingleSymbolQuoteResponse">
              <part name="quote" type="xsd:string"/>
            </message>
           
            <portType name="SingleSymbolStockQuoteService">
              <operation name="getQuote">
                <input message="tns:SingleSymbolRequest"/>
                <output message="tns:SingleSymbolQuoteResponse"/>
              </operation>
            </portType>
          
            <binding name="SingleSymbolBinding"
                     type="tns:SingleSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuote">
                <soap:operation soapAction="http://www.getquote.com/GetQuote"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>  
          </definitions>
          
          

          發(fā)布 UDDI tModel
          WSDL 服務(wù)接口描述由服務(wù)接口提供者發(fā)布。發(fā)布了這個(gè)文檔后,服務(wù)提供者才可以發(fā)布一個(gè)引用服務(wù)接口的 businessService。這個(gè)服務(wù)接口被作為 tModel 發(fā)布,將包含一個(gè)對(duì) WSDL 服務(wù)接口文檔的引用。

          清單 2包含發(fā)布上面列出的服務(wù)接口時(shí)創(chuàng)建的 tModel。

          清單 2:個(gè)案研究 1 UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService-interface</name>
          
            <description xml:lang="en">
              Standard WSDL service interface definition for a stock quote service.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
                http://www.getquote.com/services/SQS-interface.wsdl#SingleSymbolBinding
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
          
          

          發(fā)布 UDDI businessService
          實(shí)現(xiàn)這個(gè)服務(wù)接口的服務(wù)提供者可以發(fā)布一個(gè)引用與服務(wù)接口相關(guān)聯(lián)的 tModel 的 businessService 描述。不必使用 WSDL 指定服務(wù)實(shí)現(xiàn)的服務(wù)描述。

          清單 3:個(gè)案研究 1 UDDI businessService
          <?xml version="1.0"?>
          <businessService businessKey="" serviceKey="">
            <name>StockQuoteService</name>
          
            <description xml:lang="en">
              Stock Quote Service
            </description>
          
            <bindingTemplates>
              <bindingTemplate bindingKey="" serviceKey="">
                <description>
                  Single Symbol Service
                <description>
                <accessPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo tModelKey="[tModel Key for Service Interface]">
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
            </bindingTemplates>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </businessService>
          
          

          構(gòu)建一個(gè) WSDL 服務(wù)實(shí)現(xiàn)文檔
          既然 UDDI businessService 不是根據(jù) WSDL 服務(wù)實(shí)現(xiàn)文檔創(chuàng)建的,那么需要 WSDL 的工具或運(yùn)行時(shí)組件將不得不根據(jù) businessService 和被它的 bindingTemplates 引用的 tModel 的內(nèi)容構(gòu)建一個(gè) WSDL 文檔。

          清單 4包含一個(gè) WSDL 服務(wù)實(shí)現(xiàn)文檔,該文檔是根據(jù)這個(gè)個(gè)案研究的 UDDI businessService 的內(nèi)容創(chuàng)建的。值顯示在圖表鍵中。

          清單 4:個(gè)案研究 1 根據(jù) UDDI businessService 創(chuàng)建的 WSDL 服務(wù)實(shí)現(xiàn)
          <?xml version="1.0"?>
          <definitions name="StockQuoteService"
            xmlns:interface1="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
            xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <import namespace="http://www.getquote.com/StockQuoteService-interface"
               location="http://www.getquote.com/wsdl/SQS-interface.wsdl"/>
          
            <service name="StockQuoteService">
              <documentation>Stock Quote Service</documentation>
              
              <port name="StockQuoteServicePort"
                  binding="interface1:SingleSymbolBinding">
                <documentation>Single Symbol Service</documentation>
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
            </service>
          </definitions>
          
          

          關(guān)鍵字:

          Definitions― definitions 元素的 name 屬性根據(jù) businessService 名稱設(shè)置。XML 模式、WSDL、SOAP 綁定、HTTP 綁定和 MIME 綁定的 XML 名稱空間引用被添加到 definitions 元素。
          Import― 一個(gè) import 元素是為一個(gè)引用 WSDL 服務(wù)接口文檔的 tModel 創(chuàng)建的。tModel 關(guān)鍵字被用于獲取 tModel 詳細(xì)信息。tModel 包含引用 WSDL 服務(wù)接口文檔的 overviewURL。namespace 屬性使用 WSDL 服務(wù)接口文檔中的 targetNamespace 來(lái)設(shè)置。location 屬性使用與服務(wù)接口定義相關(guān)聯(lián)的 tModel 內(nèi) overviewURL 中的值來(lái)設(shè)置。對(duì)于每個(gè) import 元素,XML 名稱空間引用都要被添加到 definitions 元素中,方法是使用服務(wù)接口文檔中的 targetNamespace。
          Service― service 元素的 name 屬性根據(jù) businessService 名稱設(shè)置。因?yàn)榉?wù)名稱是一個(gè) NCName,所以必須修改 businessService 名稱以獲取適當(dāng)?shù)?WSDL 服務(wù)名稱。service 元素中的 documentation 元素根據(jù) businessService 描述設(shè)置。
          Port― 一個(gè) port 元素是為 businessService(此 businessService 引用使用 WSDL 描述的服務(wù))中的一個(gè) bindingTemplate 創(chuàng)建的。port 元素的 name 屬性被設(shè)置為服務(wù)名稱,并附加字符串“Port”。為了設(shè)置 binding 屬性,綁定引用是從 tModel 中的 overviewURL 獲取的。如果沒(méi)有指定綁定是在 overviewURL 上,那么 WSDL 服務(wù)接口中的第 1 個(gè)綁定被用于設(shè)置綁定名稱。因?yàn)?binding 屬性是一個(gè) QName,所以用服務(wù)接口引用的 XML 名稱空間規(guī)范作為綁定名稱的前綴。如果 bindingTemplate 包含一個(gè)描述,那么它將被用于設(shè)置 port 元素中的 documentation 元素。port 元素中的 extension 元素是根據(jù)綁定類型創(chuàng)建的。對(duì)于一個(gè) SOAP 綁定,使用 soap:address 元素。extension 元素的 location 屬性根據(jù) bindingTemplate 中的 accessPoint 設(shè)置。

          個(gè)案研究 2:帶有一個(gè)服務(wù)接口文檔的服務(wù)實(shí)現(xiàn)
          服務(wù)接口可以由一個(gè)人來(lái)開(kāi)發(fā),然后由另一個(gè)人來(lái)實(shí)現(xiàn)和引用。對(duì)于那些只對(duì) WSDL 服務(wù)描述進(jìn)行操作的一組工具或運(yùn)行時(shí)組件,WSDL 服務(wù)實(shí)現(xiàn)文檔將包含對(duì) WSDL 服務(wù)接口文檔的一個(gè)引用。在這個(gè)個(gè)案研究中,服務(wù)實(shí)現(xiàn)文檔只引用一個(gè) WSDL 服務(wù)接口文檔。

          WSDL 服務(wù)接口定義
          這個(gè)個(gè)案研究的服務(wù)接口定義與 UDDI 優(yōu)化方法文檔中描述的那個(gè)服務(wù)接口定義一致。服務(wù)接口文檔包含所有的 WSDL 類型、message、portType 和 binding 元素。

          清單 5包含一個(gè)簡(jiǎn)單服務(wù)接口文檔示例。這個(gè)文檔中描述的服務(wù)包含一個(gè)操作,使用 SOAP 指定綁定。突出顯示的域?qū)⒃?UDDI 數(shù)據(jù)實(shí)體中被引用。

          清單 5:個(gè)案研究 2 WSDL 服務(wù)接口文檔
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-interface"
            targetNamespace="http://www.getquote.com/StockQuoteService-interface"
            xmlns:tns="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
             Standard service interface definition for a stock quote service.
            </documentation>
          
            <message name="SingleSymbolRequest">
              <part name="symbol" type="xsd:string"/>
            </message>
          
            <message name="SingleSymbolQuoteResponse">
              <part name="quote" type="xsd:string"/>
            </message>
           
            <portType name="SingleSymbolStockQuoteService">
              <operation name="getQuote">
                <input message="tns:SingleSymbolRequest"/>
                <output message="tns:SingleSymbolQuoteResponse"/>
              </operation>
            </portType>
          
            <binding name="SingleSymbolBinding"
                     type="tns:SingleSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuote">
                <soap:operation soapAction="http://www.getquote.com/GetQuote"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>  
          </definitions>
          
          

          發(fā)布 UDDI tModel
          必須在服務(wù)接口提供者發(fā)布服務(wù)接口描述之后,才可以發(fā)布服務(wù)實(shí)現(xiàn)描述。這個(gè)服務(wù)接口被作為 tModel 發(fā)布。這個(gè) tModel 將包含對(duì) WSDL 服務(wù)接口文檔的引用。

          清單 6包含發(fā)布上面列出的服務(wù)接口時(shí)創(chuàng)建的 tModel。

          清單 6:個(gè)案研究 2 UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService-interface</name>
          
            <description xml:lang="en">
              Standard service interface definition for a stock quote service.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
                http://www.getquote.com/services/SQS-interface.wsdl#SingleSymbolBinding
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
          
          

          WSDL 服務(wù)實(shí)現(xiàn)定義
          服務(wù)實(shí)現(xiàn)文檔包含一個(gè)引用服務(wù)接口文檔的 import 元素和一個(gè)包含對(duì) Web 服務(wù)位置的引用的 service 元素。 清單 7包含這種類型 WSDL 文檔的一個(gè)示例

          清單 7:個(gè)案研究 2 WSDL 服務(wù)實(shí)現(xiàn)定義
          <?xml version="1.0"?>
          <definitions name="StockQuoteService"
            targetNamespace="http://www.getquote.com/StockQuoteService"
            xmlns:interface="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <import namespace="http://www.getquote.com/StockQuoteService-interface"
               location="http://www.getquote.com/wsdl/SQS-interface.wsdl"/>
          
            <service name="StockQuoteService">
              <documentation>Stock Quote Service</documentation>
              
              <port name="SingleSymbolService"
                  binding="interface:SingleSymbolBinding">
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
            </service>
          </definitions>
          
          

          發(fā)布 UDDI businessService
          WSDL 服務(wù)實(shí)現(xiàn)描述由服務(wù)提供者發(fā)布。服務(wù)實(shí)現(xiàn)被作為 businessService 發(fā)布。與服務(wù)接口相關(guān)聯(lián)的 tModel 被 businessService 內(nèi)的 bindingTemplate 引用。

          這個(gè)發(fā)布服務(wù)實(shí)現(xiàn)的方法不是在 UDDI 優(yōu)化方法文檔中定義的。UDDI 優(yōu)化方法文檔第 7 頁(yè)的“Publishing Service Implementations”包含對(duì)如何根據(jù) WSDL 服務(wù)實(shí)現(xiàn)文檔創(chuàng)建 businessService 的描述。

          清單 8包含根據(jù)上面列出的服務(wù)實(shí)現(xiàn)創(chuàng)建的一個(gè) businessService 的示例。

          清單 8:個(gè)案研究 2 UDDI businessService
          <?xml version="1.0"?>
          <businessService businessKey="" serviceKey="">
            <name>StockQuoteService</name>
          
            <description xml:lang="en">
              Stock Quote Service
            </description>
          
            <bindingTemplates>
              <bindingTemplate bindingKey="" serviceKey="">
                <accesssPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo tModelKey="[tModel Key for Service Interface]">
                    <instanceDetails>
                      <overviewURL>
                        http://www.getquote.com/services/SQS.wsdl#SingleSymbolService
                      </overviewURL>
                    </instanceDetails>
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
            </bindingTemplates>
              
            <categoryBag>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </businessService>
          
          

          個(gè)案研究 3:帶有多個(gè)服務(wù)接口文檔的服務(wù)實(shí)現(xiàn)
          一個(gè)服務(wù)提供者可能決定開(kāi)發(fā)一個(gè)實(shí)現(xiàn)多個(gè)服務(wù)接口定義的 Web 服務(wù)。這個(gè) Web 服務(wù)的 WSDL 服務(wù)實(shí)現(xiàn)文檔將包含對(duì)全部服務(wù)接口文檔的引用。對(duì)服務(wù)接口文檔的每個(gè)引用都是用服務(wù)實(shí)現(xiàn)文檔中的 import 元素表示。

          WSDL 服務(wù)接口定義
          對(duì)于這個(gè)個(gè)案研究,有兩個(gè)不同的服務(wù)接口。這兩個(gè)服務(wù)接口可以由同一個(gè)服務(wù)接口提供者發(fā)布,也可以由不同的服務(wù)接口提供者發(fā)布。每個(gè)服務(wù)接口文檔包含不同的目標(biāo)名稱空間、端口類型和綁定。而且,每個(gè) SOAP 綁定引用一個(gè)不同的 SOAP 服務(wù)。

          下面的圖包含一個(gè)服務(wù)的服務(wù)接口定義,這個(gè)服務(wù)要求一個(gè)股票符號(hào)作為輸入消息,一個(gè)股票報(bào)價(jià)作為響應(yīng)。

          清單 9:個(gè)案研究 3 第一個(gè) WSDL 服務(wù)接口
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-SingleSymbol-interface"
            targetNamespace="http://www.getquote.com/StockQuoteService-SingleSymbol-interface"
            xmlns:tns="http://www.getquote.com/StockQuoteService-SingleSymbol-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
              Standard service interface definition for a stock quote service that
              has only one symbol as an input parameter.
            </documentation>
          
            <message name="SingleSymbolRequest">
              <part name="symbol" type="xsd:string"/>
            </message>
          
            <message name="SingleSymbolQuoteResponse">
              <part name="quote" type="xsd:string"/>
            </message>
           
            <portType name="SingleSymbolStockQuoteService">
              <operation name="getQuote">
                <input message="tns:SingleSymbolRequest"/>
                <output message="tns:SingleSymbolQuoteResponse"/>
              </operation>
            </portType>
          
            <binding name="SingleSymbolBinding"
                     type="tns:SingleSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuote">
                <soap:operation soapAction="http://www.getquote.com/GetQuote"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:single-symobl-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>
          </definitions>
          
          

          清單 10包含一個(gè)服務(wù)接口定義,該定義可以擁有多個(gè)股票符號(hào)作為輸入消息,多個(gè)股票報(bào)價(jià)作為響應(yīng)。這個(gè)服務(wù)接口包含自己的消息(message)、端口類型(portType)和綁定(binding)規(guī)范。

          清單 10:個(gè)案研究 3 第二個(gè) WSDL 服務(wù)接口
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-MultSymbol-interface"
            targetNamespace="http://www.getquote.com/StockQuoteService-MultSymbol-interface"
            xmlns:tns="http://www.getquote.com/StockQuoteService-MultSymbol-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:xsd1="http://http://www.getquote.com/StockQuoteService/schema"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
              Standard service interface definition for a stock quote service that 
              can receive a request that contains multiple symbols.
            </documentation>
          
            <types>
              <schema targetNamespace="http://www.getquote.com/StockQuoteService/schema"
                xmlns="http://www.w3.org/2001/XMLSchema"
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">  
                <complexType name="ArrayOfString">
                  <complexContent>
                    <restriction base="soapenc:Array">
                      <attribute ref=soapenc:arrayType
                                 wsdl:arrayType="xsd:string[]"/>
                    </restriction>
                  </complexContent>
                </compextType>
              </schemas>
            </types>
            
            <message name="MultSymbolRequest">
              <part name="symbols" type="xsd1:ArrayOfString"/>
            </message>
            <message name="MultSymbolQuoteResponse">
              <part name="quotes" type="xsd1:ArrayOfString"/>
            </message>
          
            <portType name="MultSymbolStockQuoteService">
              <operation name="getQuotes">
                <input message="tns:MultSymbolRequest"/>
                <output message="tns:MultSymbolQuoteResponse"/>
              </operation>
            </portType>
          
            <binding name="MultSymbolBinding"
                     type="tns:MultSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuotes">
                <soap:operation soapAction="http://www.getquote.com/GetQuotes"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:mult-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:mult-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>
          
          

          發(fā)布 UDDI tModel
          這個(gè)個(gè)案研究的兩個(gè) WSDL 服務(wù)接口都將在 UDDI 注冊(cè)中心被作為單獨(dú)的 tModel 發(fā)布。既然每個(gè)服務(wù)接口只包含一個(gè)綁定,overviewURL 就不需要引用一個(gè)特定綁定。 清單 11包含描述第一個(gè)服務(wù)接口定義的 tModel。

          清單 11:個(gè)案研究 3 第一個(gè) UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService-SingleSymbol-interface</name>
          
            <description xml:lang="en">
              Standard service interface definition for a stock quote service that
              has only one symbol as an input parameter.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
                http://www.getquote.com/services/SQS-SingleSymbol-interface.wsdl
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
          
          

          清單 12包含第二個(gè)服務(wù)接口定義的 tModel

          清單 12:個(gè)案研究 3 第二個(gè) UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService-MultSymbol-interface</name>
          
            <description xml:lang="en">
              Standard service interface definition for a stock quote service that 
              can receive a request that contains multiple symbols.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
                http://www.getquote.com/services/SQS-MultSymbol-interface.wsdl
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
          
          

          WSDL 服務(wù)實(shí)現(xiàn)定義
          這個(gè)個(gè)案研究的 WSDL 服務(wù)實(shí)現(xiàn)文檔將包含兩個(gè) import 元素。每個(gè) import 元素將引用其中一個(gè)服務(wù)接口文檔。這個(gè)文檔還包含至少兩個(gè) port 元素。每個(gè) port 元素從其中一個(gè)服務(wù)接口文檔的內(nèi)部引用一個(gè)綁定。

          清單 13:個(gè)案研究 3 WSDL 服務(wù)實(shí)現(xiàn)
          <definitions name="StockQuoteService"
            targetNamespace="http://www.getquote.com/StockQuoteService"
            xmlns:single="http://www.getquote.com/StockQuoteService-SingleSymbol-interface"
            xmlns:mult="http://www.getquote.com/StockQuoteService-MultSymbol-interface"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <import 
             namespace="http://www.getquote.com/StockQuoteService-SingleSymbol-interface"
             location="http://www.getquote.com/wsdl/SQS-SingleSymbol-interface.wsdl"/>
          
            <import 
              namespace="http://www.getquote.com/StockQuoteService-MultSymbol-interface"
              location="http://www.getquote.com/wsdl/SQS-MultSymbol-interface.wsdl"/>
          
            <service name="StockQuoteService">
              <documentation>Stock Quote Service</documentation>
              
              <port name="SingleSymbolService"
                  binding="single:SingleSymbolBinding">
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
              
              <port name="MultSymbolService" 
                  binding="mult:MultSymbolBinding">
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
            </service>
          </definitions>
          
          

          發(fā)布 UDDI businessService
          對(duì)于這個(gè)個(gè)案研究,服務(wù)提供者開(kāi)發(fā)了一個(gè)對(duì)兩個(gè)服務(wù)接口都實(shí)現(xiàn)的服務(wù)。服務(wù)實(shí)現(xiàn)描述由服務(wù)提供者作為 UDDI businessService 發(fā)布。因?yàn)橐粋€(gè)服務(wù)實(shí)現(xiàn)使用不同的 import 元素引用多個(gè)服務(wù)接口,所以 businessService 中的每個(gè) bindingTemplate 將引用不同的 tModel。

          這個(gè)發(fā)布服務(wù)實(shí)現(xiàn)的方法不是在 UDDI 優(yōu)化方法文檔中定義的。UDDI 優(yōu)化方法文檔第 7 頁(yè)的“Publishing Service Implementations”包含對(duì)如何根據(jù) WSDL 服務(wù)實(shí)現(xiàn)文檔創(chuàng)建 businessService 的描述。

          清單 14包含根據(jù)上面列出的服務(wù)實(shí)現(xiàn)創(chuàng)建的一個(gè) businessService 的示例

          清單 14:個(gè)案研究 3 UDDI businessService
          <?xml version="1.0"?>
          <businessService businessKey="" serviceKey="">
            <name>StockQuoteService</name>
          
            <description xml:lang="en">
              Stock Quote Service
            </description>
          
            <bindingTemplates>
              <bindingTemplate bindingKey="" serviceKey="">
                <accesssPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo tModelKey="[tModel Key for Service Interface 1]">
                    <instanceDetails>
                      <overviewURL>
                        http://www.getquote.com/services/SQS.wsdl#SingleSymbolService
                      </overviewURL>
                    </instanceDetails>
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
              
              <bindingTemplate bindingKey="" serviceKey="">
                <accesssPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo tModelKey="[tModel Key for Service Interface 2]">
                    <instanceDetails>
                      <overviewURL>
                        http://www.getquote.com/services/SQS.wsdl#MultSymbolService
                      </overviewURL>
                    </instanceDetails>
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
            </bindingTemplates>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </businessService>
          
          

          個(gè)案研究 4:?jiǎn)蝹€(gè) WSDL 文檔
          如果服務(wù)接口提供者和服務(wù)提供者是同一個(gè)人,那么一個(gè) WSDL 文檔就可用于定義一個(gè)完整的 WSDL 服務(wù)描述。這個(gè)個(gè)案研究的目的是展示 UDDI businessService 和 tModel 可以從它們各自的 overviewURL 元素引用相同的文檔。

          一個(gè) WSDL 文檔被既作為 UDDI tModel,又作為 businessService 發(fā)布。這些數(shù)據(jù)實(shí)體都將包含對(duì)同一個(gè) WSDL 文檔的引用。

          單個(gè) WSDL 服務(wù)定義
          清單 15包含一個(gè)包含完整的服務(wù)定義的 WSDL 文檔示例。這個(gè)文檔包含完整地描述一個(gè) Web 服務(wù)所需的全部 WSDL 元素。將服務(wù)接口定義和服務(wù)實(shí)現(xiàn)定義組合成一個(gè) WSDL 文檔即可形成這樣一個(gè)文檔。

          清單 15:個(gè)案研究 4 單個(gè)文檔中完整的 WSDL 服務(wù)定義
          <?xml version="1.0"?>
          <definitions name="StockQuoteService"
            targetNamespace="http://www.getquote.com/StockQuoteService"
            xmlns:tns="http://www.getquote.com/StockQuoteService"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
             Service definition for a complete stock quote service.
            </documentation>
          
            <message name="SingleSymbolRequest">
              <part name="symbol" type="xsd:string"/>
            </message>
          
            <message name="SingleSymbolQuoteResponse">
              <part name="quote" type="xsd:string"/>
            </message>
           
            <portType name="SingleSymbolStockQuoteService">
              <operation name="getQuote">
                <input message="tns:SingleSymbolRequest"/>
                <output message="tns:SingleSymbolQuoteResponse"/>
              </operation>
            </portType>
          
            <binding name="SingleSymbolBinding"
                     type="tns:SingleSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuote">
                <soap:operation soapAction="http://www.getquote.com/GetQuote"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:single-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:single-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>  
          
            <service name="StockQuoteService">
              <documentation>Stock Quote Service</documentation>
              
              <port name="SingleSymbolService"
                  binding="tns:SingleSymbolBinding">
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
            </service>
          </definitions>
          
                 

          發(fā)布 UDDI tModel
          當(dāng) UDDI tModel 被發(fā)布時(shí),它將包含對(duì) WSDL 文檔(該文檔包含完整的服務(wù)描述)的引用。創(chuàng)建這個(gè) tModel 使用的過(guò)程與為 WSDL 服務(wù)接口定義所定義的過(guò)程一樣。盡管 overviewURL 將包含對(duì)一個(gè)完整的 WSDL 文檔的引用,tModel 仍是只引用這個(gè)文檔中的綁定。這意味著 tModel 不引用 service 和 port 元素。

          清單 16:個(gè)案研究 4 UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService</name>
          
            <description xml:lang="en">
              Service definition for a complete stock quote service.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
               http://www.getquote.com/services/SQS.wsdl
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
                  
                 

          發(fā)布 UDDI businessService
          UDDI businessService 是根據(jù)完整的 WSDL 服務(wù)描述創(chuàng)建的,使用的過(guò)程與 WSDL 服務(wù)實(shí)現(xiàn)文檔所用的一樣。

          清單 17:個(gè)案研究 4 UDDI businessService
          <?xml version="1.0"?>
          <businessService businessKey="" serviceKey="">
            <name>StockQuoteService</name>
          
            <description xml:lang="en">
              Stock Quote Service
            </description>
          
            <bindingTemplates>
              <bindingTemplate bindingKey="" serviceKey="">
                <accesssPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo tModelKey="[tModel Key for Service Interface]">
                    <instanceDetails>
                      <overviewURL>
                        http://www.getquote.com/services/SQS.wsdl#SingleSymbolService
                      </overviewURL>
                    </instanceDetails>
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
            </bindingTemplates>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </businessService>
                 

          個(gè)案研究 5:引用另一個(gè)服務(wù)接口的服務(wù)接口
          服務(wù)接口提供者可以開(kāi)發(fā)僅包含 types、message 和 portType 元素的服務(wù)接口。然后這個(gè)服務(wù)接口可被其它的服務(wù)接口提供者用來(lái)為服務(wù)接口指定特定綁定。只有包含這些綁定的服務(wù)接口才可被作為 UDDI tModel 發(fā)布。僅包含 types、message 和 portType 元素的 WSDL 服務(wù)接口無(wú)法被作為 UDDI tModel 發(fā)布。UDDI tModel 只可引用至少包含一個(gè) binding 元素的 WSDL 服務(wù)接口。

          帶有 messages 和 portTypes 的 WSDL 服務(wù)接口定義
          服務(wù)接口提供者開(kāi)發(fā)了僅包含 messages 和 portTypes 的服務(wù)接口。服務(wù)接口不必包含綁定規(guī)范。

          清單 18:個(gè)案研究 5 帶有 messages 和 portType 的 WSDL 服務(wù)接口定義
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-interface"
            targetNamespace="http://www.getquote.com/StockQuoteService-interface"
            xmlns:tns="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
              Standard service interface definition for a stock quote service
              without any bindings.
            </documentation>
          
            <message name="SingleSymbolRequest">
              <part name="symbol" type="xsd:string"/>
            </message>
          
            <message name="SingleSymbolQuoteResponse">
              <part name="quote" type="xsd:string"/>
            </message>
           
            <portType name="SingleSymbolStockQuoteService">
              <operation name="getQuote">
                <input message="tns:SingleSymbolRequest"/>
                <output message="tns:SingleSymbolQuoteResponse"/>
              </operation>
            </portType>
          </definitions>
                 

          帶有多個(gè)綁定(bindings)的 WSDL 服務(wù)接口定義
          服務(wù)提供者可以實(shí)現(xiàn)僅包含 message 和 portType 元素的現(xiàn)有服務(wù)接口定義。這個(gè)實(shí)現(xiàn)會(huì)要求一個(gè)特定綁定,這個(gè)綁定由服務(wù)提供者指定。這個(gè)綁定規(guī)范被放在一個(gè)服務(wù)接口文檔中,該文檔還將包含對(duì)原始服務(wù)接口文檔的引用。

          清單 19:個(gè)案研究 5 帶有多個(gè)綁定的 WSDL 服務(wù)接口定義
          <?xml version="1.0"?>
          <definitions name="StockQuoteService-binding"
            targetNamespace="http://www.getquote.com/StockQuoteService-binding"
            xmlns:interface="http://www.getquote.com/StockQuoteService-interface"
            xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <documentation>
              Service interface binding definition for a stock quote service.
            </documentation>
          
            <import namespace="http://www.getquote.com/StockQuoteService-interface/"
                    location="http://www.getquote.com/SQS-interface.wsdl">
          
            <binding name="SingleSymbolBinding"
                     type="interface:SingleSymbolStockQuoteService">
              <soap:binding style="rpc"
                            transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="getQuote">
                <soap:operation soapAction="http://www.getquote.com/GetQuote"/>
                <input>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                  <soap:body use="encoded"
                      namespace="urn:single-symbol-stock-quotes"
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
              </operation>
            </binding>  
          </definitions>
          

          發(fā)布帶有多個(gè)綁定的服務(wù)接口的 UDDI tModel
          帶有多個(gè)綁定的服務(wù)接口的 tModel 可作為 tModel 被發(fā)布。這個(gè) tModel 將只引用包含綁定定義的 WSDL 服務(wù)接口文檔。必須檢索這個(gè)文檔來(lái)確定包含服務(wù)接口定義其余內(nèi)容的文檔。完整的服務(wù)接口定義是根據(jù)原始服務(wù)接口文檔中的 import 語(yǔ)句確定的。

          清單 20包含一個(gè) UDDI tModel,這個(gè) UDDI tModel 是根據(jù)只包含綁定定義的 WSDL 服務(wù)接口定義創(chuàng)建的。

          清單 20:個(gè)案研究 4 UDDI tModel
          <?xml version="1.0"?>
          <tModel tModelKey="">
            <name>http://www.getquote.com/StockQuoteService-binding</name>
          
            <description xml:lang="en">
              Service interface binding definition for a stock quote service.
            </description>
          
            <overviewDoc>
              <description xml:lang="en">
                WSDL Service Interface Document
              </description>
              <overviewURL>
               http://www.getquote.com/services/SQS-binding.wsdl
              </overviewURL>
            </overviewDoc>
          
            <categoryBag>
              <keyedReference tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                              keyName="uddi-org:types" keyValue="wsdlSpec"/>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </tModel>
          
                 

          WSDL 服務(wù)實(shí)現(xiàn)定義
          WSDL 服務(wù)實(shí)現(xiàn)文檔包含一個(gè) import 引用,它只引用包含綁定定義的 WSDL 服務(wù)接口文檔。對(duì)這個(gè)服務(wù)定義進(jìn)行操作的 WSDL 工具或運(yùn)行時(shí)環(huán)境必須能夠遵循完整的導(dǎo)入鏈。這個(gè)文檔將導(dǎo)入包含 binding 元素的 WSDL 文檔,然后它導(dǎo)入包含 types、message 和 portType 元素的 WSDL 文檔。這 3 個(gè)文檔全部結(jié)合在一起提供一個(gè)完整的 WSDL 服務(wù)定義。

          清單 21:個(gè)案研究 5 WSDL 服務(wù)實(shí)現(xiàn)定義
          <?xml version="1.0"?>
          <definitions name="StockQuoteService"
            targetNamespace="http://www.getquote.com/StockQuoteService"
            xmlns:binding="http://www.getquote.com/StockQuoteService-binding"   
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
          
            <import namespace="http://www.getquote.com/StockQuoteService-binding"
               location="http://www.getquote.com/wsdl/SQS-binding.wsdl"/>
          
            <service name="StockQuoteService">
              <documentation>Stock Quote Service</documentation>
              
              <port name="SingleSymbolService"
                  binding="binding:SingleSymbolBinding">
                <soap:address location="http://www.getquote.com/stockquoteservice"/>
              </port>
            </service>
          </definitions>
                 

          發(fā)布 UDDI businessService
          WSDL 服務(wù)實(shí)現(xiàn)定義是作為 UDDI businessService 被發(fā)布的。每個(gè) tModel 都將被使用 tModelInstanceInfo 元素引用。兩個(gè) tModel 都是引用,因此可使用任一個(gè) tModel 執(zhí)行搜索操作。

          必須遍歷導(dǎo)入鏈來(lái)確定需要的 tModelInstanceInfo 的數(shù)目。對(duì)于這個(gè)個(gè)案研究,導(dǎo)入鏈中只有兩個(gè)服務(wù)接口文檔,所以將只在 bindingTemplate 中指定兩個(gè) tModelInstanceInfo 元素。

          第 1 個(gè) tModelInstanceInfo 將包含對(duì)包含綁定定義的服務(wù)接口文檔的引用。這個(gè) tModelInstanceInfo 還將包含一個(gè)將引用 WSDL 服務(wù)實(shí)現(xiàn)文檔的 overviewURL。

          第 2 個(gè) tModelInstanceInfo 元素將引用與包含 message 和 portType 元素的服務(wù)接口相關(guān)聯(lián)的 tModel。這個(gè) tModelInstanceInfo 將不包含 overviewURL 元素。

          清單 22:個(gè)案研究 5 UDDI businessService
          <?xml version="1.0"?>
          <businessService businessKey="" serviceKey="">
            <name>StockQuoteService</name>
          
            <description xml:lang="en">
              Stock Quote Service
            </description>
          
            <bindingTemplates>
              <bindingTemplate bindingKey="" serviceKey="">
                <accesssPoint URLType="http">
                  http://www.getquote.com/stockquoteservice
                </accessPoint>
                <tModelInstanceDetails>
                  <tModelInstanceInfo 
                      tModelKey="[tModel Key for binding Service Interface]">
                    <instanceDetails>
                      <overviewURL>
                        http://www.getquote.com/services/SQS.wsdl#SingleSymbolService
                      </overviewURL>
                    </instanceDetails>
                  </tModelInstanceInfo>
                </tModelInstanceDetails>
              </bindingTemplate>
            </bindingTemplates>
              
            <categoryBag>
              <keyedReference tModelKey="UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384" 
                              keyName="Stock market trading services" 
                              keyValue="84121801"/>
            </categoryBag>
          </businessService>
                 

          總結(jié)
          在本文中,我討論了幾個(gè) WSDL 用法個(gè)案研究,它們展示了如何在 UDDI 注冊(cè)中心發(fā)布不同類型的 WSDL 服務(wù)描述。這些個(gè)案研究提供了基于 XML 的從 WSDL 到適當(dāng)?shù)?UDDI 數(shù)據(jù)實(shí)體的映射。這個(gè)系列的下一篇文章將展示如何使用 UDDI for Java API(UDDI4J)和“Java 工具箱 Web 服務(wù)描述語(yǔ)言”(Web Services Description Language for Java Toolkit(WSDL4J))通過(guò)編程在 UDDI 注冊(cè)中心發(fā)布 WSDL 服務(wù)描述。這兩個(gè)包都是開(kāi)放源代碼的項(xiàng)目,可在 參考資料部分訪問(wèn)。

          參考資料

          關(guān)于作者
          Peter Brittenham 目前是 IBM Web Services Toolkit的首席體系架構(gòu)設(shè)計(jì)師。Web 服務(wù)工具箱(Web Services Toolkit)包含使用 SOAP 和 WSDL 構(gòu)建 Web 服務(wù)所需的工具和運(yùn)行時(shí)支持,以及在 UDDI 注冊(cè)中心發(fā)布和查找服務(wù)定義的運(yùn)行時(shí)支持。可通過(guò) peterbr@us.ibm.com與他聯(lián)系。

          posted on 2005-06-21 13:28 笨笨 閱讀(664) 評(píng)論(0)  編輯  收藏 所屬分類: J2EEALL
          主站蜘蛛池模板: 江川县| 清涧县| 沛县| 仙游县| 页游| 保靖县| 邯郸县| 郸城县| 石嘴山市| 德昌县| 美姑县| 吐鲁番市| 文安县| 调兵山市| 密山市| 福建省| 浙江省| 万山特区| 彰化县| 西青区| 工布江达县| 涪陵区| 荔浦县| 湖口县| 修水县| 汾阳市| 凯里市| 永新县| 枣强县| 蕲春县| 西乌| 龙岩市| 平南县| 固安县| 江安县| 玉田县| 南平市| 鄢陵县| 湘潭县| 建始县| 秦安县|