You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ronny Aerts <ro...@intris.be> on 2014/05/19 15:33:57 UTC

setHeader from xpath and other header

Hello camel community,

I have spring xml situation where I have some xml in a message header (as result of other actions in the route).

I noticed that I can use content based routing with xpath where the xpath content does not come from the body but from the message header as in the example below.
<choice id="check-document-upload">
     <when id="document-upload-ok">
           <description>release document uploaded to digital file</description>
           <xpath headerName="AddContentToDigiDos">//Status/text() = 'OK'</xpath>

And want to do the same thing with the setHeader but that does not seem to work. Can it be confirmed that the xpath from header on works in content base routing and not in setHeader?
<setHeader headerName="DestFolder"><xpath resultType="java.lang.String" headerName="AddContentToDigiDos">//DestFolder</xpath></setHeader>
--
Kind regards,
Ronny Aerts<ma...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium
R&D Integration Architect
Prince II certified
Tel: +32-3-326.50.75


Intris nv
Wapenstilstandlaan 47
B-2600 Berchem
        Tel.  +32 3 326 50 75
Fax  +32 3 326 42 23
www.intris.be<http://www.intris.be/>

DISCLAIMER
This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed.
Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify support@intris.be<ma...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person.
We accept no liability for damage related to data and/or documents which are communicated by electronic mail.

Re: setHeader from xpath and other header

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Maybe you are hit by
http://camel.apache.org/why-is-my-message-body-empty.html

On Mon, May 19, 2014 at 3:33 PM, Ronny Aerts <ro...@intris.be> wrote:
> Hello camel community,
>
> I have spring xml situation where I have some xml in a message header (as result of other actions in the route).
>
> I noticed that I can use content based routing with xpath where the xpath content does not come from the body but from the message header as in the example below.
> <choice id="check-document-upload">
>      <when id="document-upload-ok">
>            <description>release document uploaded to digital file</description>
>            <xpath headerName="AddContentToDigiDos">//Status/text() = 'OK'</xpath>
>
> And want to do the same thing with the setHeader but that does not seem to work. Can it be confirmed that the xpath from header on works in content base routing and not in setHeader?
> <setHeader headerName="DestFolder"><xpath resultType="java.lang.String" headerName="AddContentToDigiDos">//DestFolder</xpath></setHeader>
> --
> Kind regards,
> Ronny Aerts<ma...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium
> R&D Integration Architect
> Prince II certified
> Tel: +32-3-326.50.75
>
>
> Intris nv
> Wapenstilstandlaan 47
> B-2600 Berchem
>         Tel.  +32 3 326 50 75
> Fax  +32 3 326 42 23
> www.intris.be<http://www.intris.be/>
>
> DISCLAIMER
> This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed.
> Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify support@intris.be<ma...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person.
> We accept no liability for damage related to data and/or documents which are communicated by electronic mail.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/