Results 1 to 3 of 3
- 06-25-2007, 08:29 PM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 110
- Rep Power
- 0
Detect TimeOut in a HttpURL Connection
I'm trying to invoke a web service using HttpURLConnection and I'm doing the post of SOAP requirement
In general it works, but by problems with the WS it that sometimes freezes
My program freeze in the getResponseCode() method
I would need to detect the time out, and then to return an exception or something like that.
Thanks
- 07-02-2007, 04:28 PM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 119
- Rep Power
- 0
In java 1.5 is simple.There are 2 timeout
one is the connection setConnectTimeout(..))
and the other es to read
- 07-02-2007, 04:29 PM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 164
- Rep Power
- 6
URLConnection (Java 2 Platform SE 5.0))
If you use 1.4, maybe it would be better if you use Httpclient of Apache
Similar Threads
-
connection problem
By subash in forum JDBCReplies: 5Last Post: 04-22-2008, 09:17 AM -
JSP - using connection cache
By Java Tip in forum Java TipReplies: 0Last Post: 01-30-2008, 09:54 AM -
Detect loading of ImageIcon from URL?
By barkster in forum Java AppletsReplies: 1Last Post: 01-29-2008, 07:04 PM -
How to detect USB device drives & set/remove file attributes
By sharafat in forum Advanced JavaReplies: 0Last Post: 01-20-2008, 06:07 AM -
no connection
By even in forum JDBCReplies: 15Last Post: 01-02-2008, 01:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks