• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webservice timeouts

 
John Dalenson
Greenhorn
Posts: 8
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
John Dalenson
Greenhorn
Posts: 8
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic