You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Anton Koscejev (JIRA)" <ji...@apache.org> on 2013/08/30 13:51:52 UTC

[jira] [Created] (CAMEL-6687) Using simple language OGNL expressions doesn't work for Bean Binding when a field is null

Anton Koscejev created CAMEL-6687:
-------------------------------------

             Summary: Using simple language OGNL expressions doesn't work for Bean Binding when a field is null
                 Key: CAMEL-6687
                 URL: https://issues.apache.org/jira/browse/CAMEL-6687
             Project: Camel
          Issue Type: Bug
          Components: bean-integration
    Affects Versions: 2.11.1
            Reporter: Anton Koscejev
         Attachments: CamelBeanMethodOgnlFieldTest.java

The following functionality doesn't work, when one of the fields is null: 

http://camel.apache.org/bean-binding.html
{quote}
You can also use the OGNL support of the Simple expression language. Now suppose the message body is an object which has a method named asXml. To invoke the asXml method we can do as follows:
{code}.bean(OrderService.class, "doSomething(${body.asXml}, ${header.high})"){code}

Instead of using .bean as shown in the examples above, you may want to use .to instead as shown:
{code}.to("bean:orderService?method=doSomething(${body.asXml}, ${header.high})"){code}
{quote}

A test case is provided. Instead of getting values of fields "foo" and "bar" respectively, the first parameter (which should be null) receives value of pojo.toString(), while the second parameter receives the correct value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira