camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Message.copy() not exactly a copy
Date Thu, 22 Sep 2011 05:50:06 GMT
On Thu, Sep 22, 2011 at 2:51 AM, samslara <samslara@yahoo.com> wrote:
> Hi,
>  I currently have a camel route that makes use of HttpComponent.  After
> calling a service and getting a String back in the body I tried to do a
> Message.copy(), with the Message being from exchange.getIn().  The original
> Message body is of type String but the new Message body isn't of type
> String, rather it's of type
> org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream.
> Why doesn't it keep the body a String?
>

You may been fooled that the original body is a String.

Http HTTP component uses streams, and hence the message body is an InputStream.


> --
> View this message in context: http://camel.465427.n5.nabble.com/Message-copy-not-exactly-a-copy-tp4828478p4828478.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message