Axis client does not apply timeout from axis2 configuration
-----------------------------------------------------------

                 Key: AXIS2-4199
                 URL: https://issues.apache.org/jira/browse/AXIS2-4199
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.4.1
            Reporter: Christian Schweer


Axis2 seems to ignore the connection and socket timeout settings in clients, 
when read from this axis2.xml configuration.

This is part of my axis2.xml:
    <transportSender name="http"
                     
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
        <parameter name="PROTOCOL">HTTP/1.0</parameter>
        <parameter name="CONNECTION_TIMEOUT" locked="false">120000</parameter>
        <parameter name="SO_TIMEOUT" locked="false">120000</parameter>        
    </transportSender>

I have written a Test-Service that does nothing but waiting the provided 
timeMillis. 
Here is my test client code:
                        ConfigurationContext cc = ConfigurationContextFactory
                                        
.createConfigurationContextFromFileSystem("<path-to-axis2.xml>");
                        WSTestService0815Stub serviceStub = new 
WSTestService0815Stub(cc, 
"http://localhost/services/WSTestService-0.8.1.5?wsdl";);
                        serviceStub.setWaitTime(45000);

Expected result:
the service call returns normally

Actual result:
"java.net.SocketTimeoutException: Read timed out" is generated

With
                        serviceStub.setWaitTime(45000);
the expected result is received.

It seems to me, that the connection timeout and socket timeout is read from the 
configuration in CommonsHTTPTransportSender, but it never propagated to 
HttpSender: In CommonsHTTPTransportSender.writeMessageWithCommons(...) the 
httpVersion and format ist set but the timeout variables are ignored. 

IMHO they must be set in the messageContext's properties (or the Options of the 
messageContext), so that AbstractHttpSender.initializeTimeouts(..) receives the 
values.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to