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 #s

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 finall

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(); } Ot

Re: HttpClient problems

2004-05-27 Thread paul
Ortwin, It seems from the wire logs I gathered, that's the normal behaviour. I am creating a new HttpMethod object for every send. Only when I receive the response, then releaseConnection was called. Here's the code : = //convert trade to xml Stri

RE: HttpClient problems

2004-05-27 Thread Paul Wee Tian Jou
load or any > other reason preventing it from successfully processing the request. > Server log file is your best friend in this case > > Hope this helps > > Oleg > > -Original Message- > From: paul [mailto:[EMAIL PROTECTED

Re: HttpClient problems

2004-05-27 Thread Paul Wee Tian Jou
; 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. > >

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 something

RE: HttpClient problems

2004-05-27 Thread Kalnichevski, Oleg
his case Hope this helps 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 :

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, e-mail

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

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 2004/05/26

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 org.apache.commons.httpclient.HttpMethodBase.readRespon

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 2004/05