使用 jax-ws 初始化 Web 服务时出现异常

发布于 2024-11-05 13:36:39 字数 2552 浏览 3 评论 0原文

谁能告诉我问题是什么我正在尝试在我的客户端项目中创建一个新的 Web 服务客户端,该项目已经有一个 Web 服务客户端我似乎无法弄清楚出了什么问题异常

详细信息:null java.lang.NullPointerException 在 java.io.File.(File.java:222) 在 org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:505) 在 org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet (WebServiceTesterServlet.java:165)在org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:100)在org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:195)在javax.servlet.http。 HttpServlet.service(HttpServlet.java:734) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 在 org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) 在 org.apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)在org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :641)在com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)在com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)在org.apache.catalina.core。 StandardHostValve.invoke(StandardHostValve.java:185) 位于 org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) 位于 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) 位于 com .sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) 位于 com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) 位于 com.sun.grizzly.http.ProcessorTask .doProcess(ProcessorTask.java:693) 在 com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) 在 com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) 在 com. sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) 在 com .sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) 在 com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) 在 com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) )在 com.sun.grizzly.ContextTask.run(ContextTask.java:69) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) 在 com.sun.grizzly.util.AbstractThreadPool$ Worker.run(AbstractThreadPool.java:309) 在 java.lang.Thread.run(Thread.java:619)

can any one please tell me what the problem is i am trying to create a new web service client in my client side project which already has a web service client i cant seem to figure out what is wrong

Exceptions details : null
java.lang.NullPointerException at java.io.File.(File.java:222) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:505) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:165) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:100) at org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜巴黎 2024-11-12 13:36:39

这看起来像问题 GLASSFISH-14391。如果没有,请尝试使用您的 Glassfish 版本号和问题详细信息搜索 JIRA

This looks like issue GLASSFISH-14391. If not, try searching JIRA with your Glassfish version number and problem details.

好菇凉咱不稀罕他 2024-11-12 13:36:39

当我尝试不是从 localhost (localhost:8080/WebService?Tester) 而是从 IP 地址 (192.168例如.10.11:8080/WebService?Tester)。浏览器产生了上述异常,而 GlassFish 3 控制台写了这样的内容:

INFO: [ERROR] Server returned HTTP response code: 407 for URL: h ttp://xxx,xxx,xxx,xxx:8080/WebService?WSDL

无法读取 WSDL 文档:http://xxx,xxx,xxx,xxx:8080/WebService?WSDL,因为

1.找不到文档。

2.文档无法读取。

3.文档的根元素不是 .

INFO: [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
 At least one WSDL with at least one service definition needs to be provided.<br>
INFO:         Failed to parse the WSDL.
INFO: Invoking wsimport with h ttp://xxx,xxx,xxx,xxx:8080/WebService?WSDL<br>
SEVERE: wsimport failed

我使用代理服务器访问互联网,所以我认为这可能是原因。

然后我进入 IDE 中的 GlassFish 3 服务器属性(在我的例子中是 NetBeans)并关闭选项“使用 IDE 代理设置”。到时候问题就解决了。

希望它能有所帮助。

I got the same problem, when I tried to test the web service not from localhost (localhost:8080/WebService?Tester) but from IP-address (192.168.10.11:8080/WebService?Tester for example). Browser yielded the exception above while GlassFish 3 console wrote something like this:

INFO: [ERROR] Server returned HTTP response code: 407 for URL: h ttp://xxx,xxx,xxx,xxx:8080/WebService?WSDL

Failed to read the WSDL document: http://xxx,xxx,xxx,xxx:8080/WebService?WSDL, because

1.could not find the document.

2.the document could not be read.

3.the root element of the document is not .

INFO: [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
 At least one WSDL with at least one service definition needs to be provided.<br>
INFO:         Failed to parse the WSDL.
INFO: Invoking wsimport with h ttp://xxx,xxx,xxx,xxx:8080/WebService?WSDL<br>
SEVERE: wsimport failed

I use a proxy-server for Internet access, so I thought it might be the reason.

Then I went to the GlassFish 3 server properties in IDE (NetBeans, in my case) and switched off the option "Use IDE proxy settings". The problem was solved by then.

Hope it can help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文