Forum Stats

  • 3,733,357 Users
  • 2,246,747 Discussions
  • 7,856,667 Comments

Discussions

org.apache.axis2.AxisFault: Read timed out

vittalm
vittalm Member Posts: 16 Blue Ribbon

We have web service client generated from wsdl2jave of axis2-1.4.1, we are getting an error on calling webservice operation,  i have manually set timeout at one of the operation invocation, that looks fine now, but we have call so many places, do i need to set time all place same, I am not sure code i have used to set time is correct.

please advice how to over come the issue, web service has been deployed on WAS, client application started giving this error, after we have installed a patch to address security issue, can we address the issue from code level.

here is the code added to set timeout

int timeOutInMilliSeconds = 3 * 60 * 1000; // Two minutes

  stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeOutInMilliSeconds));

  stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeOutInMilliSeconds));

  //end here

    

  GetPermittedTypesResponse response = stub.getPermittedTypes(get);

     permittedTypes = response.getReturn();

Here is error stack trace

org.apache.axis2.AxisFault: Read timed out

  at org.apache.axis2.AxisFault.makeFault(Unknown Source)

  at org.apache.axis2.transport.http.HTTPSender.sendViaPost(Unknown Source)

  at org.apache.axis2.transport.http.HTTPSender.send(Unknown Source)

  at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(Unknown Source)

  at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Unknown Source)

  at org.apache.axis2.engine.AxisEngine.send(Unknown Source)

  at org.apache.axis2.description.OutInAxisOperationClient.send(Unknown Source)

  at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Unknown Source)

  at org.apache.axis2.client.OperationClient.execute(Unknown Source)

  at com.ecs.services.EcsObjectServiceStub.instantiateDocument(Unknown Source)

  at com.ey.edocs.ecs.client.EcsObjectClient.instantiateDocument(Unknown Source)

  at com.ey.edocs.ldi.helpers.ObjectHelper.createEcsObject(Unknown Source)

  at com.ey.edocs.ldi.helpers.ObjectHelper.createEcsEmail(Unknown Source)

  at com.ey.edocs.ldi.views.Import$16.run(Unknown Source)

  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)

Caused by: java.net.SocketTimeoutException: Read timed out

  at java.io.BufferedInputStream.fill(Unknown Source)

  at java.io.BufferedInputStream.read(Unknown Source)

  at org.apache.commons.httpclient.HttpParser.readRawLine(Unknown Source)

  at org.apache.commons.httpclient.HttpParser.readLine(Unknown Source)

  at org.apache.commons.httpclient.HttpConnection.readLine(Unknown Source)

  at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(Unknown Source)

  at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown Source)

  at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown Source)

  at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)

  at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)

  at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)

  at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)

  at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)

  at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Unknown Source)

  ... 14 more

Tagged:
This discussion has been closed.