Thnaks Claus:
So Itried this:
<when>
<xpath
headerName="RouteConfiguration">/authorizationCheck='enabled'</xpath>
but I still get an error:
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 50;
The markup in the document following the root element must be well-formed.
Here is my xml:
, Accept-Encoding=gzip,deflate,sdch}
08:43:09,051 INFO [proxy] (qtp1392880326-387) *****************
<authorizationCheck>enabled</authorizationCheck><outputPersistence>enabled</outputPersistence><targeturl>http://54.201.55.171:8080/</targeturl><method>POST</method><inputPersistence>enabled</inputPersistence><taskName>Just
a sample
task</taskName><pathPattern>camelsimulator/camelsimulator/camelTaskFr/taskFramework</pathPattern>***************
08:43:09,068 ERROR [stderr] (qtp1392880326-387) [Fatal Error] :1:50: The
markup in the document following the root element must be well-formed.
08:43:09,070 ERROR [stderr] (qtp1392880326-387) [Fatal Error] :1:50: The
markup in the document following the root element must be well-formed.
08:43:09,073 ERROR [org.apache.camel.processor.DefaultErrorHandler]
(qtp1392880326-387) Failed delivery for (MessageId:
ID-dt-lprevost-57688-1396625911690-0-2 on ExchangeId:
ID-dt-lprevost-57688-1396625911690-0-1). Exhausted after delivery attempt: 1
caught: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath:
/authorizationCheck='enabled' with headerName RouteConfiguration. Reason:
javax.xml.xpath.XPathExpressionException
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor
Elapsed (ms)
[proxy ] [proxy ] [http://0.0.0.0:8888
] [ 35]
[proxy ] [convertBodyTo1 ] [convertBodyTo[java.lang.String]
] [ 2]
[proxy ] [log1 ] [log
] [ 2]
[proxy ] [process1 ] [ref:routeConfiguratorProcessor
] [ 4]
[proxy ] [log2 ] [log
] [ 4]
[proxy ] [log3 ] [log
] [ 1]
[proxy ] [choice1 ] [when[xpath{XPath:
/authorizationCheck='enabled'}]choice[] ] [ 20]
Exchange
and my header is set like that:
exchange.getIn().setHeader(ROUTE_CONFIGURATION_HEADER,
configuration);
where configuration is my xml string
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-xpath-tp5749754p5749816.html
Sent from the Camel - Users mailing list archive at Nabble.com.