| Author |
Webservice timeouts
|
John Dalenson
Greenhorn
Joined: Feb 07, 2012
Posts: 8
|
|
Hi All,
I have a web-service to download a file. I am setting the timeouts like the following, but I think they are not working. I set very small value to request timeout and the webservice was downloading a huge document for long time without timing out.
How can test connect and request timeout?
port.getRequestContext().put("com.sun.xml.internal.ws.request.timeout", webserviceInfoProperties.getProperty("request_timeout")); // Timeout in millis
port.getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", webserviceInfoProperties.getProperty("connect_timeout"));
Thanks.
|
 |
John Dalenson
Greenhorn
Joined: Feb 07, 2012
Posts: 8
|
|
John Dalenson wrote:Hi All,
I have a web-service to download a file. I am setting the timeouts like the following, but I think they are not working. I set very small value to request timeout and the webservice was downloading a huge document for long time without timing out.
How can test connect and request timeout?
port.getRequestContext().put("com.sun.xml.internal.ws.request.timeout", webserviceInfoProperties.getProperty("request_timeout")); // Timeout in millis
port.getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", webserviceInfoProperties.getProperty("connect_timeout"));
Thanks.
any help would be appreciated.
|
 |
John Dalenson
Greenhorn
Joined: Feb 07, 2012
Posts: 8
|
|
|
Anybody?
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2194
|
|
Hi!
The timeouts you have set are associated with the time it takes to establish a (socket) connection and the maximum time between establishing a connection and receiving data from the connection.
Since you say that the client has already started receiving data, then none of the above timeouts apply.
Best wishes!
|
My free books and tutorials: http://www.slideshare.net/krizsan
|
 |
John Dalenson
Greenhorn
Joined: Feb 07, 2012
Posts: 8
|
|
Ivan Krizsan wrote:Hi!
The timeouts you have set are associated with the time it takes to establish a (socket) connection and the maximum time between establishing a connection and receiving data from the connection.
Since you say that the client has already started receiving data, then none of the above timeouts apply.
Best wishes!
Thanks for reply Ivan. But, i have set a very small request timeout and have tried downloading a bigger file. The total time to transfer the file is more than the request timeout value. I was expecting to timeout because of this, but it didn't.
How can I simulate the connect timeout error? I tried changing the endpoint location to the unreachable IP, it fails to connect, but it doesn't say that the request timed out.
|
 |
 |
|
|
subject: Webservice timeouts
|
|
|