Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 105BDDE07 for ; Sun, 28 Oct 2012 18:56:08 +0000 (UTC) Received: (qmail 34383 invoked by uid 500); 28 Oct 2012 18:56:07 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 34345 invoked by uid 500); 28 Oct 2012 18:56:07 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 34336 invoked by uid 99); 28 Oct 2012 18:56:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2012 18:56:07 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: unknown (nike.apache.org: error in processing during lookup of cyril.lakech@adeoservices.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2012 18:56:00 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TSY1J-0007yu-Un for users@camel.apache.org; Sun, 28 Oct 2012 11:55:37 -0700 Date: Sun, 28 Oct 2012 11:55:37 -0700 (PDT) From: clakech To: users@camel.apache.org Message-ID: In-Reply-To: References: <1351269252691-5721617.post@n5.nabble.com> <3A69C440-AEFF-4C65-9D3A-1BF9426F5DE7@gmail.com> Subject: Re: HTTP4 component body CachedOutputStream to String MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_70352_18941676.1351450537939" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_70352_18941676.1351450537939 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for those explanation. Everything is clear and works now. Regards, Cyril Lakech 2012/10/28 Christian Mueller [via Camel] < ml-node+s465427n5721655h80@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]> > 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]> > 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 NO= T > > 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, c= lick > here > . > NAML > --=20 Ce message et toutes les pi=C3=A8ces jointes sont =C3=A9tablis =C3=A0 l'att= ention=20 exclusive de leurs destinataires et sont confidentiels. Si vous recevez ce= =20 message par erreur, merci de le d=C3=A9truire et d'en avertir imm=C3=A9diat= ement=20 l'exp=C3=A9diteur. L'internet ne permettant pas d'assurer l'int=C3=A9grit= =C3=A9 de ce=20 message, le contenu de ce message ne repr=C3=A9sente en aucun cas un engage= ment=20 de la part de GROUPE ADEO. -- View this message in context: http://camel.465427.n5.nabble.com/HTTP4-compo= nent-body-CachedOutputStream-to-String-tp5721616p5721676.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_70352_18941676.1351450537939--