geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject Re: Help preventing SocketTimeOut in WebService
Date Mon, 03 Dec 2007 06:49:21 GMT
See if something like this works (I have not tried this):

Greeter greeter = service.getPort(Greeter.class);
javax.xml.ws.BindingProvider binding = (javax.xml.ws.BindingProvider)greeter;
binding.getRequestContext().put(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT,
new Integer(900000));

greeter.greetMe(..);

Jarek

On Nov 29, 2007 4:41 AM, Peter Petersson <peter@pmb.mine.nu> wrote:
> Hi
>
> Im using Axis2 in Geronimo v2.0.2 for a WebService. As I am new to
> webservices i have used the great JAX-WS example at
> http://cwiki.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html as
> template for my work but as my modified function sometimes take several
> seconds to complete I get a socket timeout exception so my question is
>
> What can I do to increase the socket wait time? (preferably on the
> server side)
>
> I have tried find a way to cast the javax.xml.ws.Service (on the client
> side) to be able to set the time out grammatically via a option but with
> no luck and I have also (on the server side) included and set the parameter
> <parameter name="SO_TIMEOUT" locked="false">long_value</parameter>
> in WEB-INF/conf/axis2.xml but the file dose not seem to be read.
>
> thanks
>    Peter Petersson
>
> javax.xml.ws.WebServiceException: java.net.SocketTimeoutException: Read
> timed out
>         at
> org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:174)
>         at
> org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:69)
>         at
> org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:127)
>         at
> org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:575)
>         at
> org.apache.axis2.jaxws.core.controller.AxisInvocationController.doInvoke(AxisInvocationController.java:110)
>         at
> org.apache.axis2.jaxws.core.controller.InvocationController.invoke(InvocationController.java:105)
>         at
> org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:271)
>         at
> org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:141)
>         at $Proxy23.create(Unknown Source)
>         at org.apache.jsp.add_jsp._jspService(add_jsp.java:150)
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:353)
>         at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
>         at
> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
>         at
> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
>         at
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
>         at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
>         at
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
>         at
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>         at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>         at
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>         at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>         at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>         at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>         at
> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
>         at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
>         at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
>         at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
>         at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>         at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>         at
> org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:570)
>         ... 28 more
> 2007-nov-29 09:04:00 org.eclipse.birt.data.engine.impl.DataEngineImpl
> shutdown
> INFO: Data engine shuts down
> 09:04:00,678 ERROR [CommonsHTTPTransportSender]
> org.apache.axis2.AxisFault
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>         at
> org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)
>         at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:294)
>         at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:211)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at
> org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:151)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
>         at
> org.apache.geronimo.axis2.pojo.POJOWebServiceContainer.processPOSTRequest(POJOWebServiceContainer.java:114)
>         at
> org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(Axis2WebServiceContainer.java:248)
>         at
> org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(Axis2WebServiceContainer.java:205)
>         at
> org.apache.geronimo.axis2.Axis2WebServiceContainer.invoke(Axis2WebServiceContainer.java:167)
>         at
> org.apache.geronimo.webservices.WebServiceContainerInvoker.service(WebServiceContainerInvoker.java:84)
>         at
> org.apache.geronimo.webservices.POJOWebServiceServlet.service(POJOWebServiceServlet.java:79)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:353)
>         at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: com.ctc.wstx.exc.WstxIOException: null
>         at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
>         at
> org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:118)
>         at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:422)
>         at
> org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)
>         ... 28 more
> Caused by: ClientAbortException:  java.net.SocketException: Broken pipe
>         at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
>         at
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
>         at
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
>         at
> org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
>         at
> org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
>         at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
>         at
> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
>         at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
>         ... 31 more
> Caused by: java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at
> org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)
>         at
> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124)
>         at
> org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)
>         at org.apache.coyote.Response.doWrite(Response.java:560)
>         at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
>         ... 38 more
>
>

Mime
View raw message