3

从本周开始,我无法从 Axis 1.4 Web 服务获得大量响应。我的 Web 服务客户端在这周之前可以正常工作。但是现在,当我使用存根发出一个大请求时,它以“连接已关闭 [...] 连接由对等方重置:套接字写入错误”结束。

然后我开始使用相同的存根方法发送较小的请求,并且工作正常......我尝试向我的存根“stub.setTimeout(10000)”添加超时,但它没有用。当我创建 SSL 证书时,我还设置了一个超时,例如:

SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
socket.setSoTimeout(10000);

也没有工作...

这是完整错误堆栈跟踪的第一部分...

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: 
faultString: javax.net.ssl.SSLException: Connection has been shutdown:    javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket    write error
faultActor: 
faultNode: 
faultDetail: 
{http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at ca.gc.shc.ws.SpineSoapBindingStub.interpolate(SpineSoapBindingStub.java:582)
at    ca.ogsl.ocean.clientsBridge.SpineClientAdaptor.interpolateAll(SpineClientAdaptor.java:220)
at ca.ogsl.ocean.clientsBridge.SpineRunnable.run(SpineRunnable.java:30)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265)
at org.apache.axis.Message.writeTo(Message.java:539)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 18 more

Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(Unknown Source)
at com.sun.net.ssl.internal.ssl.OutputRecord.write(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
... 25 more

有人有线索或知道我该如何解决这个问题吗?

哦......我正在使用:Eclipse - Tomcat 6 - Java 6 - Axis 1.4

非常感谢您花时间回答!!!

4

0 回答 0