You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by kioub <by...@gmail.com> on 2012/01/05 10:26:30 UTC

Camel XQuery Endpoint route with XQuery functions problem

Hello all,

I want to route a message with an RSS payload to a XQuery endpoint using a
route similar to this :
from("rss:http://feeds.feedburner.com/JavaCodeGeeks").marshal().rss().to("xquery:com/jcg/test/mytransform.xquery").to("file://rss");

The XQuery transformation file "mytransform.xquery" must contain XQuery
functions like data(...) etc.

When I try to execute the route h get a "org.w3c.dom.DOMException:
HIERARCHY_REQUEST_ERR"

I have instructed the Camel XQuery page that specifically says : "You can
also use functions inside your query, in which case you need an explicit
type conversion (or you will get a org.w3c.dom.DOMException:
HIERARCHY_REQUEST_ERR) by passing the Class as a second argument to the
xquery() method"

But I am not using the xquery() function!!!

So my question is : How to use functions when using XQuery as an Endpoint in
camel?

BRs

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-XQuery-Endpoint-route-with-XQuery-functions-problem-tp5122214p5122214.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel XQuery Endpoint route with XQuery functions problem

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its better to use the @user mailing list, for questions about Camel.

Have you tried to convert the feed to String before sending to the
xquery component?
 from("rss:http://feeds.feedburner.com/JavaCodeGeeks")
.convertBodyTo(String.class)
.marshal().rss().to("xquery:com/jcg/test/mytransform.xquery")
.to("file://rss");



On Thu, Jan 5, 2012 at 10:26 AM, kioub <by...@gmail.com> wrote:
> Hello all,
>
> I want to route a message with an RSS payload to a XQuery endpoint using a
> route similar to this :
> from("rss:http://feeds.feedburner.com/JavaCodeGeeks").marshal().rss().to("xquery:com/jcg/test/mytransform.xquery").to("file://rss");
>
> The XQuery transformation file "mytransform.xquery" must contain XQuery
> functions like data(...) etc.
>
> When I try to execute the route h get a "org.w3c.dom.DOMException:
> HIERARCHY_REQUEST_ERR"
>
> I have instructed the Camel XQuery page that specifically says : "You can
> also use functions inside your query, in which case you need an explicit
> type conversion (or you will get a org.w3c.dom.DOMException:
> HIERARCHY_REQUEST_ERR) by passing the Class as a second argument to the
> xquery() method"
>
> But I am not using the xquery() function!!!
>
> So my question is : How to use functions when using XQuery as an Endpoint in
> camel?
>
> BRs
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-XQuery-Endpoint-route-with-XQuery-functions-problem-tp5122214p5122214.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/