This: http://camel.apache.org/predicate.html says that I can use an xquery in a predicate, but I can't find an example.

My message coming back contains a status tag. I want to check it for "OK" to make sure it processed correctly. Here's what I wrote to make sure the concept was sound.

                        .transform().xquery("/status", String.class)
                        .choice()
                          .when(body().isEqualTo("OK"))

But this destroys the entire message. I would like something like: body().xquery("/status", String.class).isEqualTo("OK").

I could always do a contains, but two letters is a little likely to appear in the string. I might try a regex if this won't work, but wanted to try first.

Thanks.


Reply via email to