Hi

When you have Node as the type. Can you try test

a)
first with a use-case where there is only 1 element. And then onwards,
0 or 2+ elements?

b)
And then do another test where the first use-case has 2+ elements,.
and then 1 element.

I suspend in (b) Camel regards the type converter NodeList -> Node as
not good as it failed the first time.

The code in camel-core is likely wrong and we would need to fix that.


On Tue, Aug 27, 2013 at 5: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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to