• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I set the response timeout for a webservice from a JAXWS-RI 2.1 client

 
Kevin Mayer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use a JAXWS-RI 2.1 client to call a vendor's .NET webservice, I get a java.net.SocketTimeoutException: Read Timed Out. The .NET framework they developed the Webservice in has a default TimeOut Property in the WebService class of 1 minute.

I have located two BindingProviderProperties ((BindingProvider)port).getRequestContext().put(BindingProviderProperties.REQUEST_TIMEOUT, 180000); ((BindingProvider)port).getRequestContext().put(BindingProviderProperties.CONNECT_TIMEOUT, 120000);

Will either of these affect the time to account for the response delay greater than 1 minute?

Is there a timeout property in JAXWS for the responseContext? Something like:RESPONSE_TIMEOUT?

Websphere has these 1. CONNECTION_TIMEOUT: The amount of time WebSphere JAX-WS client would wait to establish a http/https connection (default is 180 seconds) 2. WRITE_TIMEOUT: The amount of time the client would wait to finish sending the request (default is 300 seconds) 3. RESPONSE_TIMEOUT: The amount of time the client would wait to finish receiving the response (default is 300 seconds)

I am looking for something in JAXWS similar to number 3. Maybe REQUEST_TIMEOUT or CONNECT_TIMEOUT accounts for this? Would recreating(using wsimport) the client to invoke the remote webservice asynchronously be something to consider?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!