You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Thomas Hehl <th...@heavyweightsoftware.com> on 2016/07/01 11:08:20 UTC
Choice with an xquery
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.
Re: Choice with an xquery
Posted by arno noordover <an...@gmail.com>.
As seen in http://camel.apache.org/xquery.html you should be able to do
something like
when you replace this example with:
you more or less should be up and running
--
View this message in context: http://camel.465427.n5.nabble.com/Choice-with-an-xquery-tp5784633p5784636.html
Sent from the Camel - Users mailing list archive at Nabble.com.