Thanks for those explanation. Everything is clear and works now.
Regards, Cyril Lakech 2012/10/28 Christian Mueller [via Camel] < ml-node+s465427n5721655...@n5.nabble.com> > Or convert the body into a String before you log and further process it. > And the response of the http4 call is in the in message in your processor, > because the Camel pipeline already copied the out message into the in > message for the next processor which is your processor which logs the > message. > > Best, > Christian > > On Fri, Oct 26, 2012 at 8:26 PM, Taariq Levack <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5721655&i=0>> > wrote: > > > 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 <[hidden > > email]<http://user/SendEmail.jtp?type=node&node=5721655&i=1>> > 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. > > > > > > -- > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://camel.465427.n5.nabble.com/HTTP4-component-body-CachedOutputStream-to-String-tp5721616p5721655.html > To unsubscribe from HTTP4 component body CachedOutputStream to String, click > here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5721616&code=Y3lyaWwubGFrZWNoQGFkZW9zZXJ2aWNlcy5jb218NTcyMTYxNnwxMjE3MDgxODg5> > . > NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble:email.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble:email.naml-instant_emails%21nabble:email.naml-send_instant_email%21nabble:email.naml> > -- Ce message et toutes les pièces jointes sont établis à l'attention exclusive de leurs destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. L'internet ne permettant pas d'assurer l'intégrité de ce message, le contenu de ce message ne représente en aucun cas un engagement de la part de GROUPE ADEO. -- View this message in context: http://camel.465427.n5.nabble.com/HTTP4-component-body-CachedOutputStream-to-String-tp5721616p5721676.html Sent from the Camel - Users mailing list archive at Nabble.com.