• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting time out for web service call

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In our application, I am using webservice client generated from a wsdl provided by other web service application vendor. Sometimes calls to the webservice keeps on waiting for connection, may be due to network problem or webservice is down. Can anybody tell me how to set time out value so that it can close the connection if it could not get in certain time. Is this possible at the client side code or do we need modify wsdl in order to set this or is there any other way to achieve this?
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is your client a JAX-RPC or JAX-WS client?

You can set timeout on JAX-RPC clients using setTimeout(int timeout) method on the Stub.

For JAX-WS clients also you can set timeout using BindingProvider, but for some reason it is not working with Websphere 6.1
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm seeing a similar problem in my application.

I'm using JAX-RPC with websphere v6.1. I've tried too many configurations and code snippets to set the TimeOut value.

1) (Stub) myStub.setTimeOut(20*000)
2)Configuring the ibm-webservicesclinet-bnd.xmi deployment descriptor

But nothing seems to work.
With the timeout set to 20 seconds,when the webservice provider is unavailable, application takes over 5 mins to come back with a General Exception, but since our Total transaction TimeOut (in the WAS console) is only 120 secs, the applications sees a Timeout exception and Rollback is performed. The Network team analyzed the issue and said our Client is creating multiple request to the provider which could be the reason why it takes more than the TimeOut value to return.

I did come across this article by IBM and feel it could be my issue although i'm not using SSL as IBM reports:
http://www-01.ibm.com/support/docview.wss?uid=swg1PM24564

IBM doesnt mention any temporary fixes for this, can anybody help me limit the number of attempts ot the total time of all attempts ?? so that my app works fine.

Regards,
shaz
 
reply
    Bookmark Topic Watch Topic
  • New Topic