2011-07-13 55 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)。