2011-07-13 123 views
2

我試圖在NetBeans IDE 7.0中使用選項WSDL URL創建Web服務客戶端。不幸的是,它不能夠創建一個與下面的錯誤而失敗:無法從NetBeans中的WSDL URL創建Web服務客戶端

撒克遜不能寫一個DOMResult除非saxon9-dom.jar是在classpath

enter image description here

見狀後錯誤消息,我甚至確認是否將saxon9-dom.jar添加到NetBeans中的庫中。是的,它已經可用。我不知道爲什麼仍然出現錯誤。有人能讓我知道哪裏出了問題嗎?

我正在嘗試爲this WSDL創建Web服務客戶端。我在NetBeans中創建新的Web服務客戶端時選擇JAX-WS Style客戶端樣式選項。

UPDATE:
谷歌搜索後,我讀到有下列2塊地的一些線索:

1)http://www.mail-archive.com/[email protected]/msg09659.html

This is due to the new event-handling framework that has been added after 0.95. The step in the build process that generates the resource files for the various messages, seems to require a writable DOM implementation.

As the message indicates, Saxon offers such an implementation in a separate JAR, which needs to be added to the classpath when building FOP Trunk.

2)http://xmlbeans.apache.org/sourceAndBinaries/index.html

Using XPath/XQuery requires an additional download of saxonb9-0-0-4j.zip and placing on the classpath of the files saxon9.jar and saxon9-dom.jar that it contains. The zip is available here. We cannot distribute this zip in a binary distribution due to licensing issues.

所以,我想到了在類路徑中更改saxon9-dom.jar。我以前使用的是從saxonb9-1-0-8j.zip開始的saxon9-dom.jar,但是當我試圖包含saxonb9-0-0-8j.zip中的saxon9-dom.jar時,現在這個錯誤消失了,現在我得到了一個不同的錯誤,如下所示。任何想法/線索?

enter image description here

+0

在NetBeans中向wsimport添加-httpproxy參數之後,我收到錯誤「Saxon無法寫入DOMResult,除非saxon9-dom.jar在類路徑中」。我刪除它後,該錯誤消失。也許這是你的情況? – Damian

回答

0

Web服務使用WSDL文件,以便爲他們創建一個Web消費者,你必須指定WSDL URL描述的,所以。

您可以通過添加?WSDL ar和url來獲取它。

例如:

CrudService.asmx成爲

CrudService.asmx WSDL

(它在您完成測試Web服務,它出現在測試結束時,只是更換呢?? WSDL)。