理解 UDDI 注册中心的 WSDL(5) - 51CTO.COM

来源:百度文库 编辑:神马文学网 时间:2024/05/08 07:33:37
理解 UDDI 注册中心的 WSDL(5)
http://tech.51cto.com  2006-12-19 14:10  Peter Brittenham等  developerWorks 中国  我要评论(0)
摘要:Web 服务描述语言(WSDL)有多种用法。特别是,根据应用程序的需要,WSDL 在 UDDI 注册中心有好几种使用方法。在这篇文章中,我们将介绍一下在 UDDI 注册中心使用 WSDL 的几种不同的方法。
标签:UDDI  WSDL
限时报名参加“甲骨文全球大会·2010·北京”及“JavaOne和甲骨文开发者大会2010”
清单 7:查找 WSDL 服务实现描述

find_service 消息也可用于定位 businessService ― 该 businessService 是某个特定服务接口的实现。 清单 8中的消息包含 find_service 消息的一个示例,它将查找 businessEntity 中的所有 businessService,这个 businessEntity 实现了股票报价服务的服务接口。由于服务接口是用 tModel 来表示,tModelBag 就被用于指定 WSDL 服务接口与股票报价服务相关联的 tModel 关键字。
清单 8:使用 tModelBag 查找 WSDL 服务实现描述
[tModel key for WSDL service interface]
find_service 消息将返回一列服务关键字。可使用get_serviceDetail 消息检索 businessService 描述。get_serviceDetail 消息将返回一个 businessService,比如清单 4中的那个。
检索了一个 businessService 后,可选择某个特定的 bindingTemplate 调用 Web 服务。bindingTemplate 中的 accessPoint 是服务的端点。overviewURL 可用于检索 WSDL 服务实现文档的内容,该文档可能包含关于已实现服务的额外详细信息。
查找 UDDI bindingTemplate
如果 businessService 包含多个 bindingTemplate,可能会很难确定要使用哪个 bindingTemplate。 find_binding 消息可用于定位应该使用的 bindingTemplate。
清单 9包含一条 find_binding 消息,可用它来检索引用特定的 tModel 的 bindingTemplate。可将这个 tModel 与 WSDL 服务接口描述中的特定绑定关联起来。
清单 9:查找 UDDI bindingTemplate
[tModelKey for WSDL service interface]
这条消息将返回一个或多个 bindingTemplate,比如清单 10中的那个。访问过 bindingTemplate 之后,accessPoint 中列出了 Web 服务的端点。 如果 bindingTemplate 是根据现有的 WSDL 服务实现文档创建的,那么 overviewURL 可能包含一个对这个文档的引用。可访问这个文档获取额外的、人类可读的关于 Web 服务的信息, 这些信息在 UDDI 注册中心找不到。
清单 10:UDDI bindingTemplate
http://www.getquote.com/singlestockquote http://www.getquote.com/services/SQS.wsdl
作者简介
Peter Brittenham 目前是 IBM Web Services Toolkit的首席体系架构设计师。
Francisco Curbera 是 IBM TJ Watson 研究中心的一个研究人员,他于 1993 加入该研究中心。
Dave Ehnebuske 是 IBM 的软件组中的一位杰出的工程师, 负责应用集成和中间件的开发。
Steve Graham 是 IBM 软件组的新兴技术分部的一位体系架构设计师。
(责任编辑:铭铭mingming_ky@126.com TEL:(010)68476636)