On Thu, May 3, 2012 at 8:24 PM, gavindscott <gavindsc...@gmail.com> wrote:
>
> Claus Ibsen-2 wrote
>>
>> On Tue, May 1, 2012 at 8:11 PM, Purple Tea &lt;maisa_manoel@&gt; wrote:
>>> Thank you for your reply.
>>>
>>> Does the simple language also allows us to send multiple method
>>> parameters
>>> like the new features offered in the bean binding?
>>>
>>
>> Yes, just provide a method signature such with the parameters
>> separated by comma.
>> There is a limitation on what can be passed in as parameters, but
>> thats documented on that bean binding page
>>
>> <simple>${body.doSomething("Hi Camel", ${header.bar}, true)}</simple>
>> [ SNIP ]
>>
>
> This seems to only work when the parameters are simple values such as
> strings, integers, etc.  For example:
>
>        public void testBodyOgnlOnAnimalWithOgnlParams() throws Exception {
>                exchange.getIn().setBody(new Animal("tiger", 13));
>                exchange.getIn().setHeader("friend", new Animal("donkey", 4));
>                assertExpression("${body.setFriend(${header.friend})}", null);
>        }
>
> Fails with org.apache.camel.NoTypeConversionAvailableException: No type
> converter available to convert from type: java.lang.String to the required
> type: org.apache.camel.language.simple.SimpleTest.Animal with value donkey
>
> Is that a known limitation?
>

Yes its a limitation currently. I have logged a JIRA
https://issues.apache.org/jira/browse/CAMEL-5252


> --
> Gavin Scott
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Invoking-a-bean-returned-by-a-previous-bean-invocation-tp5676696p5684000.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to