camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
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 <> 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
> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message