I wonder if your XPath is returning zero nodes. Try to find out the length of the NodeList with the getLength method.
What exactly is this @OJBCamelXPath annotation? And how does it recognise namespace "foo"? You don't seem to declare it (unless the custom annotation is taking care of it somehow - an extension of the standard XPath?). Please paste the source of @OJBCamelXPath and a sample input XML document. Thanks, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Tue, Aug 27, 2013 at 4:40 PM, ychawla <premiergenerat...@yahoo.com>wrote: > Hello All, > I am using Camel Xpath parameter binding. I have a method that has an > expression like this for example: > > public void process(Exchange exchange, > @OJBCamelXPath("/foo:Container") NodeList > containerNodeList) throws > Exception > > I know that the Xpath will only return a single node, however, I need to > bind to the parameter NodeList or else I get this exception: > > camel No type converter available to convert from type: > org.apache.xml.dtm.ref.DTMNodeList to the required type: org.w3c.dom.Node > > I saw this Camel issue that was resolved: > > https://issues.apache.org/jira/browse/CAMEL-5403 > > This suggests that there is a type converter to go from a NodeList of size > 1 > to a Node. I am using Camel 2.10.3 so I should have this typeconverter. > > Is this typeconverter used with parameter binding or only in the Xpath in > the DSL? > > Thanks, > Yogesh > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Xpath-parameter-binding-NodeList-vs-Node-tp5738067.html > Sent from the Camel - Users mailing list archive at Nabble.com. >