- 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>