3 Replies Latest reply on Aug 1, 2011 1:40 PM by Claus Ibsen

    Xquery endpoint with Import Module

    Jay Mann Newbie

      Hi all,


      I'm trying to use an XQuery endpoint which looks like this:


      <camel:to uri="xquery:com/test/xquery/manual.xq"/>


      Where "com/test/xquery/manual.xq" is located in my "src/main/resources" folder.

      I also have an xquery file name "utils.xq" that i want to import into the manual.xq file.  It is locaed in the same folder as manual.xq.


      When i try to put an import inside the manual.xq Xquery file like this:


      import module namespace utils = "myutils" at "utils.xq";


      It cannot resolve the file.  If i put the utils.xq into the FuseESB_HOME/etc directory and give it a uri  relative to the fuseESB home directory it works correctly:


                   import module namespace utils = "myutils" at "utils.xq";  "etc/utils.xq"


      But the files need to live in my package.


      any suggestions?