什么是UDDI?
UDDI 是一种目录服务,通过它,企业可注册并搜索 Web services。如行业发布了一个用于航班比率检测和预订的 UDDI 标准,航空公司就可以把它们的服务注册到一个 UDDI 目录中。然后旅行社就能够搜索这个 UDDI 目录以找到航空公司预订界面。当此界面被找到后,旅行社就能够立即与此服务进行通信。

  - UDDI 指通用的描述、发现以及整合(Universal Description, Discovery and Integration)

  - UDDI 是一种用于存储有关 web services 的信息的目录

  - UDDI 是一种由 WSDL 描述的网络服务接口目录

  - UDDI 经由 SOAP 进行通迅

  - UDDI 被构建于 Microsoft .NET 平台之中

 

UDDI 数据类型

  UDDI 提供一种发布和查找服务描述的方法。UDDI 数据实体提供对定义业务和服务信息的支持。WSDL 中定义的服务描述信息是 UDDI 注册中心信息的补充。UDDI 提供对许多不同类型的服务描述的支持。因此,UDDI 没有对 WSDL 的直接支持, 也没有对任何其它服务描述机制的直接支持。 在 UDDI 注册中心有 4 种主要的数据类型: businessEntity、 businessService、 bindingTemplatetModel

  WebService 应用(5) - Web Services 平台元素 UDDI(Universal Description, Discovery, and Integration)

  businessEntity 提供关于商家的信息,可以包含一个或多个 businessService。这个商家是服务提供者。Web 服务的技术和业务描述在 businessService 和其 bindingTemplate 中被定义。每个 bindingTemplate 包含一个对一个或多个 tModel 的引用。tModel 被用于定义服务的技术规范。

 

发布和查找 WSDL 描述 

   一个完整的 WSDL 服务描述是由一个服务接口和一个服务实现文档组成的。由于服务接口表示服务的可重用定义,它在 UDDI 注册中心被作为 tModel 发布。 服务实现描述服务的实例。每个实例都是使用一个 WSDL service 元素定义的。服务实现文档中的每个 service 元素都被用于发布 UDDI businessService。当发布一个 WSDL 服务描述时,在服务实现被作为 businessService 发布之前,必须将一个服务接口作为一个 tModel 发布。

  下图包含从 WSDL 到 UDDI 的映射概览 。

   WebService 应用(5) - Web Services 平台元素 UDDI(Universal Description, Discovery, and Integration)

   

发布服务接口

  在 UDDI 注册中心,服务接口被作为 tModel 发布。tModel 由服务接口提供者发布。tModel 中的一些元素是使用来自 WSDL 服务接口描述中的信息构建的。下表是定义创建 tModel 的步骤。一个有效的对 WSDL 服务接口定义的 tModel 引用应该是使用 targetNamespace 命名,并且必须包含 overviewURL 和 categoryBag 设置。  

步骤

UDDI tModel

WSDL 服务接口

描述

必需

1

Name

definitions 元素targetNamespace 属性

tModel 名称使用服务接口文档的目标名称空间设置。名称需要一致以确保只使用服务实现文档中的信息就可以定位 tModel

2

description

definitions 元素中的documentation 元素

tModel description 元素被限制为只能使用 256 个字符。这个元素的英文值可根据 definitions 元素的前 256 个字符设置(documentation 元素与服务接口文档中的 definitions 元素相关联)。如果 documentation 元素不存在,那么应该使用 definitions 元素中的 name 属性。

3

overviewURL

[服务接口文档 URL 和绑定规范]

服务接口文档的位置必须在 overviewURL 元素中设置。如果服务接口文档中有多个绑定,那么必须在 URL 中对绑定进行编码。

4

categoryBag

[不可用]

tModel categoryBag 必须至少包含一个键控的引用。这个键控的引用必须包含一个对 uddi-org:types tModel 的引用,而且键名必须是 wsdlSpec 。这个条目把 tModel 当作一个 WSDL 服务接口定义。

  下面的清单包含一个示例 WSDL 服务接口文档。  

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

相关文章:

  • 2021-11-02
  • 2021-07-29
  • 2021-08-29
  • 2021-11-13
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2021-05-29
  • 2022-12-23
  • 2021-05-18
相关资源
相似解决方案