Which version of Camel are you using?
I just add a simple unit test in Camel trunk , the test is passed.
Here is the code snippet:

 public void testNullValue() throws Exception {
        exchange.getIn().setBody("Value");
        assertExpression("${in.body} != null", true);
        assertExpression("${body} == null", false);

        exchange.getIn().setBody(null);
        assertExpression("${in.body} == null", true);
        assertExpression("${body} != null", false);
    }

Willem

On 3/24/11 5:13 AM, Eric East wrote:
Hi,

I have a l spring  bean that which may/may not rreturn a null value.


The trace output when a null is return includes:
      ...  BodyType:null, Body:null

Can I configure a spring syntax choice to see if the body is null?

I have tried various checkis with simple, but the ${body} !=null is always
true.



               ${body} != null







Thanks

--
View this message in context: 
http://camel.465427.n5.nabble.com/choice-when-check-BodyType-null-Body-null-tp4259599p4259599.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to