Axis WSDL2Java 生成的代码:快速连续执行请求时出现服务器错误
我已获得第 3 方 wsdl 和部署描述符等,用于 Axis Web 服务的自定义加密。我使用 WSDL2Java 生成 java 类,在某种程度上,一切都运行得很好。当我每隔几分钟调用这些方法时,它们会正常工作并返回有效数据。但是当我快速连续地调用它们(因为我需要)时,我得到一个普通的旧服务器错误(如下)。
如果我输出 axisFault 故障代码和详细信息,我会得到以下信息:-
类 org.apache.axis.AxisFault 故障代码 = {http://xml.apache.org/axis/}服务器 故障原因 = 服务器错误 故障字符串 = 服务器错误 故障详细信息 = [Lorg.w3c.dom.Element;@2d4ba772 [服务器错误 在 org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473) 在 org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) 在 org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 在 org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 在 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 在 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) 在 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 在 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) 在 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 在 java.lang.Thread.run(Thread.java:595) , 第三方主机名
有人可以帮忙吗?我束手无策..这可能是时间/缓存问题吗?也许是 WSDL2JAVA 工具创建的 createCall() 方法中的缓存值之一?
I have been provided with a 3rd party wsdl and a deployment descriptor etc for custom encryption for an Axis web service. I used WSDL2Java to generate the java classes and it all works pretty well... up to a point. When I invoke the methods several minutes apart they work correctly and return valid data. but when I invoke them (as I need to) in quick succession I get a plain old Server Error (below).
If I ouptut the axisFault fault codes and details I get the following:-
class org.apache.axis.AxisFault
Fault Code = {http://xml.apache.org/axis/}Server
Fault Reason = Server Error
Fault String = Server Error
Fault Details = [Lorg.w3c.dom.Element;@2d4ba772
[Server Error
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595), 3rdpartyhostname
Can anyone please help? I'm at my wits end.. Could it be a timing / caching issue? Perhaps one of the cache values in the createCall() method that the WSDL2JAVA tool creates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是我如何使用 ant 构建脚本生成轴客户端:
也许您正在使用奇怪的参数组合?你检查过那些吗?据我所知,上面是针对轴 1.4 的。
你用的是2.0还是1.4哪个版本?我知道我花了相当长的时间才在 2.0 中做到这一点。以下是它与 mvn 的配合方式:
我希望这有助于阐明这个问题或进一步的想法。
您可能还想检查您部署的东西是否正常工作。这可能根本不是客户一代的问题。毕竟它说服务器错误。检查服务器上的日志文件中的堆栈跟踪,也许那里有线索。
Here's how I generate an axis client with an ant build script:
Maybe you are using a weird combination of parameters? Have your checked on those? The above is for axis 1.4 as far as I remember.
What version are you using 2.0 or 1.4? I know it took me quite some time to get this right for 2.0. Here's how it works with mvn:
I hope this helps shed some light or further ideas on the issue.
You might also want to check if the stuff you deployed is working right. This might not be an issue of the client generation at all. After all it says server error. Check the logfiles on the server for stacktraces maybe there is a clue there.