隨筆-128  評(píng)論-55  文章-5  trackbacks-0
           

          對(duì)于 WSDL 解析,有如下 3 種基本方法:

          1.       基于 DOM 的方法:由于 WSDL 文件從本質(zhì)上來講是一個(gè) XML 文件,現(xiàn)有的 DOM API(例如 Xerces)能夠用來進(jìn)行解析或者構(gòu)建 WSDL 文件。這種方法是最通用的,但同時(shí)也是處理 XML 文件最費(fèi)力的方法。盡管從技術(shù)上來講是可行的,基于 DOM API 的實(shí)現(xiàn)對(duì)于代碼敏感且容易出錯(cuò)。同時(shí),這一解決方法迫使您不得不處理兩個(gè)完全不同的模型:DOM WSDL 模型。

          2.       基于特定 API 的方法 利用 IBM WSDL4J 來實(shí)現(xiàn) WSDL 操作就是一個(gè)例子。這種方法傾向于 WSDL 模型,它允許您直接操作 WSDL 。這種方法的不足在于您不僅要處理 WSDL 本身,還要處理 WS-AddressingWS-Policy 和擴(kuò)展腳本。它同時(shí)還使用那些尚未成為標(biāo)準(zhǔn)的事物,這就意味著現(xiàn)有的一些 API 將會(huì)改變。在當(dāng)前,一些試驗(yàn)性的 API 支持 WS-Addressing 的當(dāng)前版本,但對(duì)于 WS-Policy 和擴(kuò)展腳本卻根本不支持。這就意味著這種基于特定 API 的方法不得不摻雜一定數(shù)量的 DOM 處理。

          3.       基于 Java 生成的方法:因?yàn)槊枋鑫覀儗?shí)現(xiàn)的所有腳本都是標(biāo)準(zhǔn)的 XML 腳本,因此可以生成對(duì)應(yīng)于這些腳本的 Java 類(支持 XML 編組和分組)。在這種情況下, WSDL 文件直接轉(zhuǎn)化為 Java 類,然后作為 Java 對(duì)象來管理。考慮到標(biāo)準(zhǔn)在不斷進(jìn)化這一事實(shí),定制性的擴(kuò)展將是很有必要。由于它的靈活性和對(duì)變化的適應(yīng)性,這一方法最適合實(shí)現(xiàn)我們的解決方案。

          對(duì)于WSDL模型目前有以下兩種:

          1.       JSR110規(guī)范,“Java APIs For WSDL”,是JavaWSDL1.1建模規(guī)范。

          目前的實(shí)現(xiàn)是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'

          網(wǎng)址為:http://sourceforge.net/projects/wsdl4j/

          2.       Apache Woden 開源項(xiàng)目。對(duì)WSDL2.0規(guī)范的建模。

          最新版本為 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.

                 網(wǎng)址是:http://ws.apache.org/woden/index.html



          Author: orangelizq
          email: orangelizq@163.com

          歡迎大家訪問我的個(gè)人網(wǎng)站 萌萌的IT人
          posted on 2008-04-08 20:40 桔子汁 閱讀(2263) 評(píng)論(0)  編輯  收藏 所屬分類: Web Service
          <2008年4月>
          303112345
          6789101112
          13141516171819
          20212223242526
          27282930123
          45678910

          常用鏈接

          留言簿(9)

          隨筆分類(124)

          隨筆檔案(127)

          文章分類(5)

          文章檔案(5)

          Good Blog

          技術(shù)網(wǎng)站

          搜索

          •  

          積分與排名

          • 積分 - 267507
          • 排名 - 213

          最新評(píng)論

          閱讀排行榜

          主站蜘蛛池模板: 孟州市| 大冶市| 贡觉县| 青岛市| 集安市| 辛集市| 庆阳市| 柯坪县| 镇雄县| 常州市| 慈利县| 米脂县| 黄陵县| 清水河县| 南康市| 邵东县| 贵溪市| 赞皇县| 廊坊市| 高台县| 湾仔区| 大新县| 莱芜市| 化德县| 和硕县| 夏津县| 高清| 肥城市| 五台县| 汨罗市| 札达县| 涡阳县| 昌平区| 安庆市| 墨竹工卡县| 界首市| 潼南县| 页游| 区。| 伊通| 同仁县|