This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Web Services and the fly likes Webservice timeouts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Webservice timeouts" Watch "Webservice timeouts" New topic
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Webservice timeouts
 
Similar Threads
Setting the Transaction Time
Setting Request - Response Time Out Programatically
ejb transaction times out
Lock timeout
How to specify WebService operation timeout