Did you try just:
from("direct:start").convertBodyTo(List.class).to("mock:result)
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*
On Fri, Nov 8, 2013 at 8:08 AM, brenuart <[email protected]> wrote:
> Hello,
>
> I was wondering if there are any converter registered by default in Camel
> to
> convert a body made of a single object (instance) into a List holding that
> single instance.
>
> The idea is to be able to write something like:
>
> List l = exchange.getIn().getBody(List.class);
>
> If there is no such converter by default, would it be a good idea to
> register one in my context or do you think it would cause troubles...
>
> Thanks for your advices,
>
> /Bertrand
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Converter-body-with-single-instance-into-a-List-tp5742857.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>