- UDDI 教程
- UDDI - 首頁
- UDDI - 概述
- UDDI - 元素
- UDDI - 技術架構
- UDDI - 資料模型
- UDDI - 介面
- UDDI - 使用示例
- UDDI 與 WSDL
- UDDI - 實現
- UDDI - 規範
- UDDI - 總結
- UDDI API 參考
- UDDI - API 快速參考
- UDDI 有用資源
- UDDI - 快速指南
- UDDI - 有用資源
- UDDI - 討論
UDDI - 資料模型
UDDI 包含一個 XML Schema,它描述了以下資料結構:
- businessEntity
- businessService
- bindingTemplate
- tModel
- publisherAssertion
businessEntity 資料結構
業務實體結構代表 Web 服務的提供者。在 UDDI 登錄檔中,此結構包含有關公司本身的資訊,包括聯絡資訊、行業類別、業務識別符號以及提供的服務列表。
以下是一個虛構企業的 UDDI 登錄檔條目示例:
<businessEntity businessKey = "uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40"
operator = "http://www.ibm.com" authorizedName = "John Doe">
<name>Acme Company</name>
<description>
We create cool Web services
</description>
<contacts>
<contact useType = "general info">
<description>General Information</description>
<personName>John Doe</personName>
<phone>(123) 123-1234</phone>
<email>jdoe@acme.com</email>
</contact>
</contacts>
<businessServices>
...
</businessServices>
<identifierBag>
<keyedReference tModelKey = "UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823"
name = "D-U-N-S" value = "123456789" />
</identifierBag>
<categoryBag>
<keyedReference tModelKey = "UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2"
name = "NAICS" value = "111336" />
</categoryBag>
</businessEntity>
businessService 資料結構
業務服務結構表示業務實體提供的單個 Web 服務。其描述包含有關如何繫結到 Web 服務、它是什麼型別的 Web 服務以及它屬於哪些分類的資訊。
以下是一個用於 Hello World Web 服務的業務服務結構示例。
<businessService serviceKey = "uuid:D6F1B765-BDB3-4837-828D-8284301E5A2A"
businessKey = "uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40">
<name>Hello World Web Service</name>
<description>A friendly Web service</description>
<bindingTemplates>
...
</bindingTemplates>
<categoryBag />
</businessService>
請注意,在businessKey 和serviceKey 屬性中使用了通用唯一識別符號 (UUID)。每個業務實體和業務服務在所有 UDDI 登錄檔中都透過登錄檔在首次輸入資訊時分配的 UUID 進行唯一標識。
bindingTemplate 資料結構
繫結模板是業務服務結構所代表的 Web 服務的技術描述。單個業務服務可能有多個繫結模板。繫結模板表示 Web 服務的實際實現。
以下是一個用於 Hello World 的繫結模板示例。
<bindingTemplate serviceKey = "uuid:D6F1B765-BDB3-4837-828D-8284301E5A2A"
bindingKey = "uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40">
<description>Hello World SOAP Binding</description>
<accessPoint URLType = "http">https://:8080</accessPoint>
<tModelInstanceDetails>
<tModelInstanceInfo tModelKey = "uuid:EB1B645F-CF2F-491f-811A-4868705F5904">
<instanceDetails>
<overviewDoc>
<description>
references the description of the WSDL service definition
</description>
<overviewURL>
https:///helloworld.wsdl
</overviewURL>
</overviewDoc>
</instanceDetails>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
由於業務服務可能有多個繫結模板,因此服務可以指定同一服務的不同實現,每個實現都繫結到一組不同的協議或不同的網路地址。
tModel 資料結構
tModel 是最後一個核心資料型別,但可能是最難理解的。tModel 代表技術模型。
tModel 是一種描述儲存在 UDDI 登錄檔中的各種業務、服務和模板結構的方式。任何抽象概念都可以在 UDDI 中註冊為 tModel。例如,如果您定義了一種新的 WSDL 埠型別,則可以定義一個表示 UDDI 中該埠型別的 tModel。然後,您可以透過將 tModel 與該業務服務的一個繫結模板關聯來指定給定的業務服務實現了該埠型別。
以下是一個表示 Hello World 介面埠型別的 tModel 示例。
<tModel tModelKey = "uuid:xyz987..." operator = "http://www.ibm.com"
authorizedName = "John Doe">
<name>HelloWorldInterface Port Type</name>
<description>
An interface for a friendly Web service
</description>
<overviewDoc>
<overviewURL>
https:///helloworld.wsdl
</overviewURL>
</overviewDoc>
</tModel>
publisherAssertion 資料結構
這是一個關係結構,根據特定型別的關係(例如子公司或部門)將兩個或多個 businessEntity 結構關聯起來。
publisherAssertion 結構由三個元素組成:fromKey(第一個 businessKey)、toKey(第二個 businessKey)和 keyedReference。
keyedReference 根據 tModel 中的 keyName keyValue 對指定斷言的關係型別,並透過 tModelKey 唯一引用。
<element name = "publisherAssertion" type = "uddi:publisherAssertion" />
<complexType name = "publisherAssertion">
<sequence>
<element ref = "uddi:fromKey" />
<element ref = "uddi:toKey" />
<element ref = "uddi:keyedReference" />
</sequence>
</complexType>