Hello,
I would like to use XQuery Update Facility to transform a message in a camel
route, but I get an error message : Unexpected token "copy" in path
expression.
I'm using camel version 2.8.5, and XQuery runs correctly with "FLWOR"
syntax. Is Update Facility supported ? Is there any instruction or component
missing ?
I explain what I'm trying to do (simplified example) :
This is the incoming message :
<Data>
<Item>
<ItemCode>1234</ItemCode>
<ItemName>abc def</ItemName>
</Item>
</Data>
I want to change value of node "ItemName"
My xquery program :
declare variable $in.headers.NewItemName external;
copy $data := //Data/Item
modify ( replace value of node $data/ItemName with $in.headers.NewItemName )
return
<NewData>
{$data}
</NewData>
I tested it with xqilla, it gives the expected result :
<NewData>
<Item>
<ItemCode>1234</ItemCode>
<ItemName>ABCD EFGH</ItemName>
</Item>
</NewData>
My camel route :
<from uri="imap://my.mail.server....
<setHeader headerName="NewItemName"><simple>ABCD
EFGH</simple></setHeader>
<convertBodyTo type="String"/>
<to uri="xquery:test1.xquery"/>
<to uri="activemq:queue:test"/>
Thanks for any help.
JLEmptoz
--
View this message in context:
http://camel.465427.n5.nabble.com/XQuery-Update-Facility-tp5737164.html
Sent from the Camel - Users mailing list archive at Nabble.com.