Hi
You should enable stream caching[1] if you want to read a stream more than once.
[1] http://camel.apache.org/stream-caching.html

Taariq

On 26 Oct 2012, at 18:34, clakech <cyril.lak...@adeoservices.com> wrote:

> I find an answer to my question:
> 
> to("http4://sample").convertBodyTo(String.class) WORKS FINE
> 
> to("http4://sample").log("${body}").convertBodyTo(String.class) DO NOT WORK
> 
> Why?
> 
> Because the logging EIP seems to read the inputstream which moves the
> position to the end of the buffer.
> 
> But I am still wondering why the http4 documentation says :
> "Camel will store the HTTP response from the external server on the OUT
> body. All headers from the IN message will be copied to the OUT message, so
> headers are preserved during routing. Additionally Camel will add the HTTP
> response headers as well to the OUT message headers." 
> 
> But the response is in the in body.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/HTTP4-component-body-CachedOutputStream-to-String-tp5721616p5721617.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to