Re: xpath 2.0 function bean binding camel xpath annotation

2011-05-18 Thread boday
l_tsall, haven't had a chance to look at this yet, but I'll see what I can do (in the next week hopefully)... l_tsall wrote: > > Hi again, > > Thanks for resolving this issue. > > But which is the proper resultType for the very useful xpath function > distinct-values which returns a sequence

Re: xpath 2.0 function bean binding camel xpath annotation

2011-05-13 Thread l_tsall
Hi again, Thanks for resolving this issue. But which is the proper resultType for the very useful xpath function distinct-values which returns a sequence of atomic values? template.sendBody("101012"); I can bind this with @XQuery("distinct-values(/order/credit/value)") String values and get

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-28 Thread ben.oday
added https://issues.apache.org/jira/browse/CAMEL-3911 to explore this further Claus Ibsen-2 wrote: > > 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 expres

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-28 Thread Claus Ibsen
On Thu, Apr 28, 2011 at 9:36 AM, l_tsall 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

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-28 Thread l_tsall
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/

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread ben.oday
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("/order/@customerId") Integer customerId, @XPath("orde

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread Claus Ibsen
On Wed, Apr 27, 2011 at 10:53 PM, l_tsall wrote: > I am using saxon by Setting a custom XPathFactory using System Property as > described in http://camel.apache.org/xpath.html > > System.setProperty(XPathFactory.DEFAULT_PROPERTY_NAME + ":" + > "http://saxon.sf.net/jaxp/xpath/om";, "net.sf.saxon.xp

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread l_tsall
I am using saxon by Setting a custom XPathFactory using System Property as described in http://camel.apache.org/xpath.html System.setProperty(XPathFactory.DEFAULT_PROPERTY_NAME + ":" + "http://saxon.sf.net/jaxp/xpath/om";, "net.sf.saxon.xpath.XPathFactoryImpl"); this only works with XPathBuilder.

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread Claus Ibsen
I think you need to use Saxon as XPath engine as AFAIK the XPath engine from the JDK only supports XPath 1.x functions. On Wed, Apr 27, 2011 at 9:38 PM, l_tsall wrote: > Can I combine Xpath 2 functions with camel xpath annotations? > > For example > > public void updateStatus(@XPath("/order/@cus

Re: xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread ben.oday
I get the same error when running the API directly (from 2.8-SNAPSHOT)...either way, I'll look into it a bit... XPathBuilder upperCaseBuilder = XPathBuilder.xpath("upper-case(/order/status/text())"); String result = upperCaseBuilder.evaluate(context, "in progress"); org.apache.camel.builder.xml.I

xpath 2.0 function bean binding camel xpath annotation

2011-04-27 Thread l_tsall
Can I combine Xpath 2 functions with camel xpath annotations? For example public void updateStatus(@XPath("/order/@customerId") Integer customerId, @XPath("order/status/text()") String status @XPath("upper-case(order/status