The second parameter of bean(Object, String) is for looking up the Object
method.
"parse(${body[title]}, ${body[thumbnail][path]}, ${body[prices][0][price]},
${body[id]})” cannot help camel to look up right method to use.
My suggestion is you can just pass the body object to the parse method directly.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On October 28, 2014 at 1:17:24 AM, Jonathan Vila Lopez
([email protected]) wrote:
> Hello
>
> I have a route :
>
> from("http://gat...URL....d805d").
> unmarshal().json(JsonLibrary.Jackson).
> split(simple("${body[data][results]}")).
> bean(ComicBuilder.class, "parse(${body[title]},
> ${body[thumbnail][path]}, ${body[prices][0][price]}, ${body[id]})").
> to("stream:out");
>
> and I have a println inside the method parse, but it never gets printed.
>
> If I put a log before the bean , then it works.
>
> But if I simple replace the bean line with bean(new ComicBuilder(), .... )
> then it works without putting the log command before.
>
> Why is that ?
>
>
>
> [image: Inline image 2]
>
> * Jonathan Vila **
> *
>
>
> * [email protected] *
>