java Axis Web 服务抛出错误:尝试调用服务方法时发生异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2415235/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Axis Web Service throws error: Exception occurred while trying to invoke service method
提问by Allan Kizito
I am trying to invoke a web service that I have just hosted on out linux redhat server but it throws the error {http://xml.apache.org/axis/}stackTrace:Exception occurred while trying to invoke service method + "methodname" I host the service in apache tomcat webserver
我正在尝试调用刚刚托管在 linux redhat 服务器上的 Web 服务,但它抛出错误 { http://xml.apache.org/axis/}stackTrace:Exception 在尝试调用服务方法时发生 + "methodname " 我在 apache tomcat webserver 中托管服务
The same service works fine when i host it in the windows xp environment with the same apache web server...
当我在 windows xp 环境中使用相同的 apache web 服务器托管它时,相同的服务工作正常......
Is there anyone who has experienced a similar problem.
有没有人遇到过类似的问题。
thanks..
谢谢..
回答by mlo55
in the axis2.xml ...
在axis2.xml ...
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>
set the sendStacktraceDetailsWithFaults parameter to true and you should get a copy of the stacktrace in the response (reset to false for production)
将 sendStacktraceDetailsWithFaults 参数设置为 true,您应该在响应中获得堆栈跟踪的副本(在生产中重置为 false)
回答by Shervin Asgari
I have experienced something similar. Our dev environment was running JBoss and Ubuntu, and prod/test was running Red Hat, Apache in front and JBoss.
我也经历过类似的事情。我们的开发环境运行 JBoss 和 Ubuntu,prod/test 运行 Red Hat、Apache 和 JBoss。
Prod/test was running https with certificates, and our problem was that our certificates where out of date. When we fixed that, the webservice calls got through. Maybe thats your problem?
Prod/test 使用证书运行 https,我们的问题是我们的证书已经过时了。当我们解决这个问题时,网络服务调用就成功了。也许那是你的问题?
Another thing you should do to debug is see if the wsdl is deployed and check what the webservice address it is deployed under. Maybe the address is very different in prod?
调试时应该做的另一件事是查看 wsdl 是否已部署并检查它部署在什么 web 服务地址下。也许生产中的地址非常不同?
For instance in JBoss if you go to
例如在 JBoss 中,如果你去
http://localhost:8080/jbossws/services您将看到所有已部署的服务以及它们具有的 url。

