WSDL的建模与解析

 

对于 WSDL 解析,有如下 3 种基本方法:

1.       基于 DOM 的方法:由于 WSDL 文件从本质上来讲是一个 XML 文件,现有的 DOM API(例如 Xerces)能够用来进行解析或者构建 WSDL 文件。这种方法是最通用的,但同时也是处理 XML 文件最费力的方法。尽管从技术上来讲是可行的,基于 DOM API 的实现对于代码敏感且容易出错。同时,这一解决方法迫使您不得不处理两个完全不同的模型:DOM WSDL 模型。

2.       基于特定 API 的方法 利用 IBM WSDL4J 来实现 WSDL 操作就是一个例子。这种方法倾向于 WSDL 模型,它允许您直接操作 WSDL 。这种方法的不足在于您不仅要处理 WSDL 本身,还要处理 WS-AddressingWS-Policy 和扩展脚本。它同时还使用那些尚未成为标准的事物,这就意味着现有的一些 API 将会改变。在当前,一些试验性的 API 支持 WS-Addressing 的当前版本,但对于 WS-Policy 和扩展脚本却根本不支持。这就意味着这种基于特定 API 的方法不得不掺杂一定数量的 DOM 处理。

3.       基于 Java 生成的方法:因为描述我们实现的所有脚本都是标准的 XML 脚本,因此可以生成对应于这些脚本的 Java 类(支持 XML 编组和分组)。在这种情况下, WSDL 文件直接转化为 Java 类,然后作为 Java 对象来管理。考虑到标准在不断进化这一事实,定制性的扩展将是很有必要。由于它的灵活性和对变化的适应性,这一方法最适合实现我们的解决方案。

对于WSDL模型目前有以下两种:

1.       JSR110规范,“Java APIs For WSDL”,是JavaWSDL1.1建模规范。

目前的实现是WSDL4J。最新版本为WSDL4J V1.6.22006-11-08)。

The Web Services Description Language for Java Toolkit (WSDL4J) allows the creation, representation, and manipulation of WSDL documents. Is the reference implementation for JSR110 'JWSDL'

网址为:http://sourceforge.net/projects/wsdl4j/

2.       Apache Woden 开源项目。对WSDL2.0规范的建模。

最新版本为 Woden V1.0M7b2007-08-03

The Woden project is an incubation subproject of the Apache Web Services Project to develop a Java class library for reading, manipulating, creating and writing WSDL documents, initially to support WSDL 2.0 but with the longer term aim of supporting past, present and future versions of WSDL.

There are two main deliverables: an API and an implementation. The Woden API will consist of a set of Java interfaces. The WSDL 2.0-specific portion of the Woden API will conform to the W3C WSDL 2.0 specification. The implementation will be a high performance implementation directly usable in other Apache projects such as Axis2.

       网址是:http://ws.apache.org/woden/index.html



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值