I am consuming a web service from one of our customers, and have found that the timeout setting does not seem to get respected during the connection process when the connection is secure. To be more specific, say it sometimes takes 1500 ms to connect and 500 ms to process the request. If I set the timeout for 1000 ms, then the timeout will not be triggered, even though the connection takes longer than that. With an HTTP connection, it works fine... it is only when using HTTPS. With HTTPS, if I set the timeout to be less than 500 ms, then it will throw the "read timeout" exception. Ultimately, we would be using a timeout longer than 1 second, but for testing purposes this is what we're using.
The major problem here is that while in test, the system seems to timeout in about 25 seconds or so, but in production it waits long enough that it seems to be indefinite. I could use a timer as a "hack" to handle this situation, but Axis does not provide a clean way to kill this connection. The code I am using to set this is the standard: SoapLocator locator = new SoapLocator(); SoapService service = locator.getSoapService(); (Stub)service.setTimeout(1000); I have spent a large amount of time researching this, and have not found any kind of conclusive information as to what is going on here; however I did see one post that stated there is a difference in the way the socket object is created when using a secure connection vs. non-secure, in that the timeout for non-secure is set in the constructor of the socket, while with secure it is set after the constructor is called, and that this may be the problem, since by the time the timeout value is being set, you're already stuck with the problem. Can someone help confirm this for me, and if anyone has a workaround, please let me know. Any help would be greatly appreciated. Thanks, Chris
