On Thu, Apr 28, 2011 at 9:36 AM, l_tsall <lef...@yahoo.com> wrote: > That's exactly what I needed. Thanks :) > > ben.oday wrote: >> >> The issue is that @XPath defaults the resultType to NodeList.class. But I >> think you need to use String.class instead... >> >> So, try setting the resultType explicitly, like this... >> >> public void updateStatus(@XPath(value ="/order/@customerId", resultType = >> String.class) Integer customerId, >> @XPath(value ="order/status/text()", >> resultType = String.class) String status >> @XPath(value= >> "upper-case(order/status/text())", resultType = String.class) String >> uppercaseStatus >> ) >> > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/xpath-2-0-function-bean-binding-camel-xpath-annotation-tp4344611p4345927.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
Ah we should maybe try in the @XPath situation to check the parameter type, and if possible configure the XPathBuilder to use that same type. Then it knows when evaluating the xpath expression the result is to a String. In case its not possible to do so then we rely on the camel type converter to convert the result afterwards. But the XPathBuilder has X number of types it support out of the box such as - numbers - string - boolean - dom - etc. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/