You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by clinton <cl...@ionep.com> on 2014/11/28 18:45:56 UTC

Referencing an exchange property from xpath predicate in spring dsl

I am trying to use xpath in a "loop" stmt, such that the "CamelLoopIndex"
(+1) can be used as a predicate to select a repeating segment from the msg
body.  I haven't been able to get anything to work.

Getting error:
Caused by: javax.xml.xpath.XPathExpressionException:
net.sf.saxon.trans.XPathException: expected "<name>", found "{"

Any help appreciated!

<loop>
<simple>${property.rqstDistribution.size}</simple>

<setProperty propertyName="myRepeatingSegmentPos">
     <simple>${property.CamelLoopIndex} + 1</simple>
</setProperty>
<setProperty propertyName="myRepeatingSegment">
	<xpath
saxon="true">/*/ns1:TheRepeatingSegment[function:simple(${property.myRepeatingSegmentPos})]</xpath>
</setProperty>
--other logic follows--
</loop>



--
View this message in context: http://camel.465427.n5.nabble.com/Referencing-an-exchange-property-from-xpath-predicate-in-spring-dsl-tp5759777.html
Sent from the Camel - Users mailing list archive at Nabble.com.