You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Lalit Sahoo <la...@sonata-software.com> on 2006/11/14 15:05:15 UTC
Unbuffered entity enclosing request can not be repeated
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?
<<ApacheHTTPClientEvaluator.java>> <<EvaluationTest.java>>
Re: Unbuffered entity enclosing request can not be repeated
Posted by Oleg Kalnichevski <ol...@apache.org>.
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: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org