UDDI與WSDL



UDDI 資料模型定義了用於儲存關於企業及其釋出的 Web 服務資訊的通用結構。UDDI 資料模型是完全可擴充套件的,包括多個重複的序列資訊結構。

然而,WSDL 用於描述 Web 服務的介面。WSDL 與 UDDI 的使用相當簡單。

  • 在 UDDI 中,WSDL 使用businessService、bindingTemplatetModel 資訊的組合來表示。

  • 與在 UDDI 中註冊的任何服務一樣,有關服務的通用資訊儲存在businessService 資料結構中,而關於如何以及在何處訪問服務的資訊則儲存在一個或多個關聯的bindingTemplate 結構中。每個bindingTemplate 結構都包含一個包含服務網路地址的元素,並與一個或多個描述並唯一標識服務的tModel 結構關聯。

  • 當 UDDI 用於儲存 WSDL 資訊或指向 WSDL 檔案的指標時,tModel 應按照約定稱為型別wsdlSpec,這意味著overviewDoc 元素被明確標識為指向 WSDL 服務介面定義。

  • 對於 UDDI,WSDL 內容被分成兩個主要元素:介面檔案和實現檔案。

Hertz 預訂系統 Web 服務提供了一個關於 UDDI 和 WSDL 如何協同工作的具體示例。以下是此 Web 服務的 <tModel>:

<tModel authorizedName = "..." operator = "..." tModelKey = "...">
   <name>HertzReserveService</name>
   <description xml:lang = "en">
      WSDL description of the Hertz reservation service interface
   </description>
	
   <overviewDoc>
      <description xml:lang = "en">
         WSDL source document.
      </description>
      <overviewURL>
         http://mach3.ebphost.net/wsdl/hertz_reserve.wsdl
      </overviewURL>
   </overviewDoc>
   
   <categoryBag>
      <keyedReference tModelKey = "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4"
         keyName = "uddi-org:types" keyValue = "wsdlSpec"/>
   </categoryBag>	
</tModel>

關鍵點是:

  • overviewURL 元素提供了可以找到服務介面定義 WSDL 檔案的 URL。這允許人和了解 UDDI/WSDL 的工具找到服務介面定義。

  • categoryBag 中 keyedReference 元素的目的是確保此 tModel 被分類為 WSDL 規範文件。

廣告
© . All rights reserved.