Forums Register Login

Setting timeout for JAVA program connecting to web service.

+Pie Number of slices to send: Send
Hello,

I have a JAVA program that connects to a web service to get data regularly.
But I notice that the program sometime hung when connecting to the data source. Is there any way I can set the timeout value?



Thanks in advance for all the help.
+Pie Number of slices to send: Send
The classes that you use in the com.webservices package are not standard Java classes; they come from a third-party library (maybe a library written by someone else in your company?). You'll have to lookup the documentation of the library that you're using to find out if there is any way to set a timeout.

Note, it's Java, not JAVA. It's not an acronym.
+Pie Number of slices to send: Send
This depends on client library you use. On Axis1 you may invoke stub.setTimeout(30*1000) on org.apache.axis.client.Stub.

This will set 30sec timeout for web service access.

Unfortunately, we had some very rare and strange cases when connection still "hangs" and 30sec timeout doesn't work.
+Pie Number of slices to send: Send
Third party library => move to Other APIs
+Pie Number of slices to send: Send
Hi Vilmantas,

Do we have any such timeout setting options when we use JWSDP, please advice.

Thanks
Kasi
+Pie Number of slices to send: Send
Please Don't Wake The Zombies. The last post in this thread was 9 months old, and Vilmantas hasn't been active for quite some time.
Popeye has his spinach. I have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 16175 times.
Similar Threads
create and access web service with apache axis
Unable to send mail via Web Service
parsing and displaying xml data - options?
JBoss connection time out
Help with FTP transfer
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:41:37.