Seven Stars

extracting the attribute value from a header in camel xquery

Hi,

 

I created a basic route with a cMessagingEndPoint that runs xquery below (See https://help.talend.com/reader/5cfNfbUi1rlipcLK8el0ww/Wj_fb5FTf4hdtzMUgnUQNQ):

<people>
{
for $p in /people//person
return
<person>
<firstName>{$p/firstName/text()}</firstName>
<lastName>{$p/lastName/text()}</lastName>
</person>
}
</people>

 

I added a cSetHeader just before my cMessagingEndPoint to assign header whose name is "foo"

 

My route looks like:

Capture.PNG

 

I would like to be able to use this header value in my xquery.

Capture.PNG

I tried many syntax but none of them worked out...

 

For instance I tried adding these lines in my xQuery:
<headerValue>
{ $in.headers.foo }
</headerValue>

 

Does someone know what is the syntax ?

 

Eric

  • ESB
1 REPLY
Moderator

Re: extracting the attribute value from a header in camel xquery

Hello,

Thanks for your time!

We have redirected your issue to our ESB experts and then come back to you as soon as we can.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.