Re: HttpClient problems

2004-05-28 Thread Ortwin Glück
Some comments on the posted code: 1. You should execute releaseConnection in a finally block, to ensure the connection is returned to the pool in any case: PostMethod post = null; try { post = new PostMethod(urlAddress); /* ... */ } finally { if (post != null) post.releaseConnection(); }

Re: HttpClient problems

2004-05-28 Thread paul
Ortwin, About 1, I have added the changes. 2, I need to add some id, pwd into the authentication logic, does httpclient api allow for setting this details? 3, Point noted, I will add that in. Ortwin Glück wrote: Some comments on the posted code: 1. You should execute releaseConnection in a

Re: HttpClient problems

2004-05-28 Thread Ortwin Glück
paul wrote: Ortwin, About 1, I have added the changes. 2, I need to add some id, pwd into the authentication logic, does httpclient api allow for setting this details? I don't think there is anything special. You can just create a UsernamePasswordCredentials object and add with the HttpState

HttpClient problems

2004-05-27 Thread paul
Dear all, Need help on using Httpclient 2.0. Currently, I have encountering a random problem with sending xml over to a remote site. Here's the debug log : === 2004/05/26 20:09:50:290 SGT [DEBUG] EntityEnclosingMethod - -Request body sent

Re: HttpClient problems

2004-05-27 Thread Ortwin Glück
paul wrote: 2004/05/26 20:09:50:564 SGT [DEBUG] MultiThreadedHttpConnectionManager - -Notifying no-one, there are no waiting threads org.apache.commons.httpclient.HttpRecoverableException: java.net.SocketException: Connection reset at

Re: HttpClient problems

2004-05-27 Thread paul
Here's the wire log : == 2004/05/26 20:09:50:262 SGT [DEBUG] MultiThreadedHttpConnectionManager - -HttpConnectionManager.getConnection: config = HostConfiguration[hos t=somewhere.com, protocol=https:443, port=443], timeout = 0

Re: HttpClient problems

2004-05-27 Thread Ortwin Glück
paul wrote: 2004/05/26 20:09:50:290 SGT [DEBUG] EntityEnclosingMethod - -Request body sent 2004/05/26 20:09:50:562 SGT [DEBUG] HttpMethodBase - -Closing the connection. Why is the connection closed here? Who is doing this? The response has not been read yet! Could this be a threading issue?

Re: HttpClient problems

2004-05-27 Thread Michael Becke
Why is the connection closed here? Who is doing this? The response has not been read yet! This is because of the exception when writing the request. HtttpMethodBase closes connections on exception. Mike - To unsubscribe,

RE: HttpClient problems

2004-05-27 Thread Kalnichevski, Oleg
Oleg -Original Message- From: paul [mailto:[EMAIL PROTECTED] Sent: Thu 5/27/2004 14:25 To: Commons HttpClient Project Cc: Subject:Re: HttpClient problems Here's the wire log : == 2004/05/26 20:09:50:262 SGT

Re: HttpClient problems

2004-05-27 Thread Michael Becke
Hi Paul, Two quick questions. - Have you set MultiThreadedHttpConnectionManager.setConnectionStaleCheckingEnabled() to false? If so this could be causing the problem. - It seems that the server is closing the request in mid stream. Have you checked the IIS logs? There might be

Re: HttpClient problems

2004-05-27 Thread Paul Wee Tian Jou
- [EMAIL PROTECTED] Date: Thu, 27 May 2004 08:50:18 -0400 Subject: Re: HttpClient problems Hi Paul, Two quick questions. - Have you set MultiThreadedHttpConnectionManager.setConnectionStaleCheckingEnabled() to false? If so this could be causing the problem. - It seems

RE: HttpClient problems

2004-05-27 Thread Paul Wee Tian Jou
:13 +0100 Subject: RE: HttpClient problems Paul, The problem is obviously caused by the server's dropping connection right after HttpClient is done sending the request. If you have access to the target server, check the server logs to find out what prompted the server to do so. I can think