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?
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.