Hi,

I'm using org.apache.axis2.saaj.SOAPConnectionImpl.call to send raw SOAP
messages to a webservice I could not consume otherwise.
Sometimes I got:

 e.toString():javax.xml.soap.SOAPException: Read timed out
org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:194)
org.apache.axis2.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:130)

So I would increment the time-out as in 

http://wso2.org/library/230#SO_TIMEOUT

but I couldn't find any way.
Also SAAJ standard implementation seems to lack the possibility to set a
HttpConnection time out!

So I've got the source of SOAPConnectionImpl, saved a copy in my client
project and added near line 110:


        // initialize and set Options
        Options options = new Options();
        options.setTo(new EndpointReference(url.toString()));
++++    options.setProperty(HTTPConstants.SO_TIMEOUT, timeOut );
++++    options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, timeOut);

        // initialize the Sender
        OperationClient opClient;
        try {
            serviceClient = new ServiceClient();   


timeOut is a private int also added, with getter and setter.
Is this Ok? 
Is there another way to do this without having to patch the code?

Many thanks in advance.

Bye


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to