Unable to create Web Service Client from WSDL URL in NetBeans

我是研究僧i 提交于 2019-12-11 00:31:03

问题


I'm trying to create a Web Service Client using the option WSDL URL in NetBeans IDE 7.0. Unfortunately, it is not able to create one and is failing with the following error:

Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath

After seeing this error message, I even confirmed whether saxon9-dom.jar is added to the Libraries in NetBeans. Yes, it is already available. I don't know why still the error is appearing. Can somebody let me know what is going wrong?

I'm trying to create web service client for this WSDL. I'm choosing JAX-WS Style in Client Style option while creating New Web Service Client in NetBeans.

UPDATE:
After googling, I read about some clues from the following 2 places:

1) http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/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.

So, I thought of changing saxon9-dom.jar in the classpath. I was using saxon9-dom.jar from saxonb9-1-0-8j.zip before, but when I tried to include saxon9-dom.jar available in saxonb9-0-0-8j.zip, now this error has disappeared and am getting a different error now as shown below. Any ideas/clues?


回答1:


Web Services are described using WSDL files, so in order to create a Web Consumer for them you'll have to specify the WSDL url.

You can obtain it by adding ?WSDL ar the and of the url.

For example:

CrudService.asmx becomes

CrudService.asmx?WSDL

(It you have tested your web service and it appears ?Tester at the end, just replace it with ?WSDL).



来源:https://stackoverflow.com/questions/6674336/unable-to-create-web-service-client-from-wsdl-url-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!