【发布时间】:2014-02-04 11:54:14
【问题描述】:
我正在尝试调试一个关键问题,即 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)
我所有的尝试都没有成功。任何关于如何解决这个问题的想法都非常感谢。
谢谢。
【问题讨论】:
-
您使用的是哪种 JRE / JAX-WS 实现?
-
您与服务器端团队核实了吗?有一次我在访问外部服务器 WSDL 文件时遇到了类似的问题。有时它会显示,有时则不会。在与服务器团队核实后,他们确认他们将应用程序部署在两台不同的服务器中,其中一台已关闭。有些我的请求是如何下降的,有些时候是上升的。我不知道这是否会对您有所帮助,但参与服务器端可能会有所帮助。
标签: java spring soap weblogic jax-ws