I am using Axis tcpmon SOAP monitor/HTTP proxy to simulate slow SOAP Server responses.
I can set certain delay between packets of certain length which is great to reproduce real problems we are experiencing from time to time with one of our service providers.
My client uses Axis2 ServiceClient and all I can see about timeouts is:
//options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeOutInMilliSeconds));
//options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeOutInMilliSeconds));
The above does not address the problem of slow packets or servers just performing to many operations before sending back the whole SOAP response. Ideally there would be a way to tell the client just to timeout if the whole operation takes too much time.
I think this could be achieved accessing HttpURLConnection.setReadTimeout() however I feel like I will need to go deeper in Axis2 code to provide an answer to this.
This as a common problem to be solved: You do not want your client side to hang waiting for slow server responses. Ideally the client should timeout in circumstances like slow network throughput, high latency and so on.
I am wondering if someone could point me to the right direction.