Better if you can reuse connection !!

From: vittal [mailto:[email protected]]
Sent: Friday, November 01, 2013 2:33 AM
To: [email protected]
Subject: Axis2 : org.apache.axis2.AxisFault: Read timed out

We have web service client generated from wsdl2jave - axis2-1.4.1, we are 
getting an error on calling webservice operation org.apache.axis2.AxisFault: 
Read timed out more frequently.

please help me providing informaiton

1. I manually set timeout at one of the operation invocation, that looks fine , 
but we have call so many places, do i need do same thing every place.

2. I used below code, just before request to operation, is it correct way of 
doing.

int timeOutInMilliSeconds = 3 * 60 * 1000; // Three 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();

3. I see in axis site, Global Configuration (axis2.xml), it will application to 
all operatoins, is this file sits on client or server side, how format looks.

4. can we make service operation as synchronouse, instead of mentioning 
timeout, we are not sure how much time operations will take.

4 here is the 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

---------------------------
Thanks,
Vittal

--

Reply via email to