我的代码一直产生以下错误:
org.apache.axis2.AxisFault: Timeout waiting for connection
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
经过广泛搜索后,解决方案似乎就在这里:
http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html
除非我无法直接访问http客户端(在自动生成的代码中完成)。
相反,我尝试过:
http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP
这似乎有点帮助。但是它只会延迟我总是得到超时的问题。此指令似乎也适用于旧版本的Axis,因为Axis2没有AxisProperties。我使用的是1.5.1版。有什么建议吗?