hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natarajan_Va...@emc.com
Subject RE: stream corruption
Date Thu, 22 Jan 2009 22:46:24 GMT
Oleg,

Please let me know if you need any additional information. Could you
provide more info/pointer on "XML based object serialization"?

Thanks
Valli

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Thursday, January 22, 2009 2:37 PM
To: HttpClient User Discussion
Subject: Re: stream corruption

Natarajan_Valli@emc.com wrote:
> Oleg, thanks for adding your comments. We call releaseConnection
method
> in finally. Can you think of anything else which might cause this
> problem? Again, I'm not saying that this is a bug in httpclient and
> thank you for confirming. I am seeking some help to fix the problem
that
> we have.
>

There is simply not enough information to make any more or less informed

guesses. Consider using XML based object serialization so you could 
actually see what gets corrupted.

Oleg



>  
>          m_multiThreadedHttpConnectionManager = new
>  MultiThreadedHttpConnectionManager();
>          m_client = new
> HttpClient(m_multiThreadedHttpConnectionManager);
>  
>  
>          PostMethod post = new PostMethod(url);
>          try {
>              post.setRequestEntity(new
> InputStreamRequestEntity(serializeObject(request)));
>  
>              NameValuePair[] pair = new NameValuePair[1];
>              pair[0] = new NameValuePair(name, value);
>              post.setQueryString(pair);
>              m_client.executeMethod(post);
>  
>              if (post.getStatusCode() == 200) {
>                      ObjectInputStream responseStream = new
> ObjectInputStream(post.getResponseBodyAsStream());
>                      return responseStream.readObject();
>              }
> 		 return post.getStatusText();
> 		}
> 		finally 
> 	  {
>             post.releaseConnection();
>         }
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message