当我们进行Web Services API调用时,有时我们没有收到回复。我们的线程只是在等待响应并且不会收到错误。使用com.sun.xml.ws.request.timeout
参数在Web服务请求中指定超时。但是,在这种情况下超时不起作用。
环境详情:
Application server: Weblogic
Operating System: Linux
Web services API: Metro
有没有人对这个问题有任何想法?
堆栈追踪:
"DefaultQuartzScheduler_Worker-88" RUNNABLE native
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
weblogic.utils.io.ChunkedInputStream.read(ChunkedInputStream.java:159)
java.io.InputStream.read(InputStream.java:89)
com.certicom.tls.record.ReadHandler.readFragment(Unknown Source)
com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
com.certicom.tls.record.ReadHandler.read(Unknown Source)
com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read(BufferedInputStream.java:235)
weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:220)
weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:143)
weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:463)
weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:357)
weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:945)
com.sun.xml.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(HttpClientTransport.java:209)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:160)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:116)
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:154)
com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
com.sun.xml.ws.client.Stub.process(Stub.java:222)
com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
$Proxy87.getMapping(Unknown Source)
答案 0 :(得分:1)
堆栈跟踪显示在客户端和Web服务之间打开套接字。有一些阅读正在发生,即数据传输,但可能需要很长时间。
Weblogic上的客户端或Weblogic上是否托管了Web服务?
你能检查一下netstat -an | grep
它是否显示处于ESTABLISHED状态的套接字?或其他一些状态,如TIME_WAIT或CLOSE_WAIT?
您配置了卡住线程超时了多长时间? 默认值为600秒,此操作的时间是否超过10分钟?
答案 1 :(得分:0)
尝试添加" com.sun.xml.ws.connect.timeout"。
这两个属性也以常量形式提供: com.sun.xml.ws.client.BindingProviderProperties.REQUEST_TIMEOUT com.sun.xml.ws.client.BindingProviderProperties.CONNECT_TIMEOUT
确保您不使用内部导入,它不会在WebLogic上工作。