读取超时错误 - javax.xml.ws.soap.SOAPFaultException

时间:2014-02-04 11:54:14

标签: java spring soap weblogic jax-ws

我正在尝试调试JSP应用程序在调用远程Web服务时看到请求超时的关键问题。

我应该澄清超时不会一直发生,对于较小的查询,Web服务确实会返回响应。

我已尝试在WebLogic服务器中增加超时值>方案> HTTP>发布超时和持续时间。我还尝试在spring.xml中设置JAX-WS属性,如下所示:

<util:map id="jaxwsCustomProperties">  
    <entry key="com.sun.xml.ws.request.timeout">  
        <value type="java.lang.Integer">650000</value>  
    </entry>  
    <entry key="com.sun.xml.ws.connect.timeout">  
        <value type="java.lang.Integer">650000</value>  
    </entry>  
</util:map> 

控制台输出:

org.springframework.remoting.jaxws.JaxWsSoapFaultException: Request timeout.
Read timed out; nested exception is javax.xml.ws.soap.SOAPFaultException: Request timeout.
Read timed out
    at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:395)
    at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:379)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy72.getDeviceList(Unknown Source)
    at com.company.msr.web.actionbean.DeviceListProcessor.getDeviceList(DeviceListProcessor.java:223)
    at com.company.msr.web.actionbean.MsrMainActionBean.listToJson(MsrMainActionBean.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:467)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
    at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
    at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
    at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:465)
    at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)
    at net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.company.msr.web.actionbean.UserAccessFilter.doFilter(UserAccessFilter.java:53)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.company.msr.web.actionbean.filter.AjaxFilter.doFilter(AjaxFilter.java:29)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.xml.ws.soap.SOAPFaultException: Request timeout.
Read timed out
    at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
    at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:108)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy108.getDeviceList(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:416)
    at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:392)

我对所有尝试都没有成功。任何关于如何解决这个问题的想法都深表赞赏。

感谢。

1 个答案:

答案 0 :(得分:0)

尝试为您的网络服务器设置以下内容(“服务器启动”选项卡或将其放入startWebLogic.sh脚本中):

指定尝试调用Web服务的客户端应用程序等待连接的时间(以秒为单位)。经过指定的时间后,如果尚未建立连接,则尝试超时。

-Dweblogic.http.client.defaultConnectTimeout=650000

指定客户端应用程序等待其正在调用的Web服务的响应的时间(以秒为单位)。在指定的时间过去之后,如果没有到达响应,则客户端超时。

-Dweblogic.http.client.defaultReadTimeout=650000

参考文献:

http://docs.oracle.com/cd/E14571_01/web.1111/e13760/client.htm#i227120

http://docs.oracle.com/cd/E29597_01/fusionapps.1111/e14496/compliance.htm