Details
Description
The following functionality doesn't work, when one of the fields is null:
http://camel.apache.org/bean-binding.html
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:
.bean(OrderService.class, "doSomething(${body.asXml}, ${header.high})")
Instead of using .bean as shown in the examples above, you may want to use .to instead as shown:
.to("bean:orderService?method=doSomething(${body.asXml}, ${header.high})")
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.