On Wed, Nov 21, 2012 at 12:05 PM, JasonN <[email protected]> wrote:
> Hi,
>
> I am able to call a static method from a route but can someone please advise
> on how to call a constructor?
>
> e.g.:
>
>       <setBody>
>           <method beanType="com.company.HelloBean"
> method="HelloBean(${body})"/>
>       </setBody>
>
> Thanks!
>

Thats not supported.
A constructor doesn't return an value etc. So it doesn't make much sense.

You can have a default no-arg ctr, and then invoke a method instead.



>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Call-constructor-from-route-tp5723059.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to