Discussion:
file endpoint to xquery problem
Wang Yan
2018-09-18 14:51:52 UTC
Permalink
In my camel route has below route , which send file input to xquery to
generate file output. as below shown

################# camel route ##############

from("file:src/data?moveFailed=.error").
to("xquery:myxquery.xq").to("file:target/output");


My problem is myxquery.xq file it has a function which expecting a variable
called $myTestRequest

How can I pass the message after file endpoint as the variable
($myTestRequest )and give it to XQuery endpoint to use? Any hints will be
more than welcome!


############ Below is snippet code of myXQuery ###############
declare variable $myTestRequest as element(ns:MyTestRequest) external;
xf:convert_To_InternalRequest($myTestRequest)
Claus Ibsen
2018-09-19 11:00:24 UTC
Permalink
Hi

Have you tried setting that as a header value - I think there is
something with xquery where you can refer to headers by their name.
Post by Wang Yan
In my camel route has below route , which send file input to xquery to
generate file output. as below shown
################# camel route ##############
from("file:src/data?moveFailed=.error").
to("xquery:myxquery.xq").to("file:target/output");
My problem is myxquery.xq file it has a function which expecting a variable
called $myTestRequest
How can I pass the message after file endpoint as the variable
($myTestRequest )and give it to XQuery endpoint to use? Any hints will be
more than welcome!
############ Below is snippet code of myXQuery ###############
declare variable $myTestRequest as element(ns:MyTestRequest) external;
xf:convert_To_InternalRequest($myTestRequest)
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Loading...