camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel xpath
Date Thu, 10 Apr 2014 06:23:24 GMT
Hi

Maybe you need to enable stream caching, see this FAQ
http://camel.apache.org/why-is-my-message-body-empty.html

Or your xpath expression needs to use namespaces if your xml
documentation uses that.

On Thu, Apr 10, 2014 at 6:28 AM, Lydie <lprevost@completegenomics.com> wrote:
> So I still have an error:
>
> I never go to my first choice: 'enabled':
>
>
> <choice>
>         <when>
>          <xpath
> headerName="ROUTE_CONFIGURATION_HEADER">/authorizationCheck='enabled'</xpath>
>                 <log message="**** Authorization enabled" />
>                 <process ref="authorizationProcessor" />
>         </when>
>         <otherwise>
>                 <log message="**** Authorization disabled" />
>         </otherwise>
> </choice>
>
>
>
> This what I get when I print my ROUTE_CONFIGURATION_HEADER:
>
>
> 21:17:30,030 INFO  [proxy] (qtp1338864318-153)
> +++++{RouteConfiguration=<authorizationCheck>enabled</authorizationCheck>Accept-Encoding=gzip,deflate,sdch,
> Host=localhost:8888, breadcrumbId=ID-dt-lprevost-61655-1397103421574-0-2,
> CamelHttpServletResponse=HTTP/1.1 200
>
> ****
> 21:17:30,103 INFO  [proxy] (qtp1338864318-153) **** Authorization disabled
>
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId              ProcessorId          Processor
> Elapsed (ms)
> [proxy             ] [proxy             ] [http://0.0.0.0:8888
> ] [     23187]
> [proxy             ] [convertBodyTo1    ] [convertBodyTo[java.lang.String]
> ] [         2]
> [proxy             ] [log1              ] [log
> ] [         1]
> [proxy             ] [process1          ] [ref:routeConfiguratorProcessor
> ] [     22078]
> [proxy             ] [log2              ] [log
> ] [         4]
> [proxy             ] [log3              ] [log
> ] [         1]
> [proxy             ] [doTry1            ] [doTry
> ] [        70]
> [proxy             ] [choice1           ] [when[xpath{XPath:
> /authorizationCheck="enabled"}]choice[]                     ] [        69]
> [proxy             ] [log5              ] [log
> ] [         1]
> [proxy             ] [log6              ] [log
> ] [         0]
> [proxy             ] [process4          ] [ref:inputProcessor
> ] [      1028]
>
>
>
> why do I have :
> [when[xpath{XPath: /authorizationCheck="enabled"}]choice[] not validated as
> true??????
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-xpath-tp5749754p5750025.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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/

Mime
View raw message