On Tue, 2006-11-14 at 19:35 +0530, Lalit Sahoo wrote:
> Hi All,
> 
> I am trying to use the Apache HttpClient in a multithreaded
> environment.
> 
> Here I have one web application running in Weblogic.I am giving a soap
> request by using an xml file.
> 
> But I am getting following exception:
> 
> org.apache.commons.httpclient.ProtocolException: Unbuffered entity
> enclosing request can not be repeated. 
>         at
> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:486)
>  
>         at
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2016)
>  
>         at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:994)
> 
> I am sending the source file as an attachment.
> 
> Can anybody help in this regard?
> 

Lalit,

Consider using a repeatable request entity (such as StringRequestEntity
or FileRequestEntity) or implementing a custom RequestEntity class
capable of recreating its content in case the request needs to retried.

You can use this piece of code as a starting point

http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/FileRequestEntity.java

Oleg

> <<ApacheHTTPClientEvaluator.java>>  <<EvaluationTest.java>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to