Basex HTTP server : path not found error

Thursday, 6 October 2011 · 4 messages
RJ
Ralf Jungin reply to Erol Akarsu, 6 Oct 2011, 19:016 Oct 2011 17:09 #
Hi, these queries load scripts from the database and execute them. To execute scripts from HTTPPATH, use something like http://localhost:8984/rest?run=filename.xq Kind regards, Ralf
Quoted text · Erol Akarsu · 24 lines
On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote: > Christian, > > I am trying to set up Basex HTTP server and run some xquery scripts through > REST style. > > In http://docs.basex.org/wiki/REST#Usage_Examples, we have example > http://localhost:8984/rest/factbook/index.xq to run index.xq scripts. > > Where are we keeping xquery scripts? > > In .basex configuration file, we have > > DBPATH = /Users/xxx/BaseXData > HTTPPATH = /Users/xxx/BaseXHTTP > REPOPATH = /Users/xx/BaseXRepo > > Which one is for folder that keeps xquery scripts? Above query returns > "Path does not exist." error. I have compiled the recent version of Basex > and use it on Mac OSX Lion 64 bit. > > Thanks > > Erol Akarsu
EA
Erol Akarsu6 Oct 2011 19:01 #
Christian, I am trying to set up Basex HTTP server and run some xquery scripts through REST style. In http://docs.basex.org/wiki/REST#Usage_Examples, we have example http://localhost:8984/rest/factbook/index.xq to run index.xq scripts. Where are we keeping xquery scripts? In .basex configuration file, we have DBPATH = /Users/xxx/BaseXData HTTPPATH = /Users/xxx/BaseXHTTP REPOPATH = /Users/xx/BaseXRepo Which one is for folder that keeps xquery scripts? Above query returns "Path does not exist." error. I have compiled the recent version of Basex and use it on Mac OSX Lion 64 bit. Thanks Erol Akarsu
RJ
Ralf Jungin reply to Erol Akarsu, 6 Oct 2011, 22:006 Oct 2011 20:36 #
Hi, You can not have multiple ? in a query, just pass the variables as additional parameters: http://localhost:8984/rest?run=filename.xq&$a=444&$b=3333 Kind regards, Ralf
Quoted text · Erol Akarsu · 72 lines
On Thursday 06 October 2011 20:00:15 Erol Akarsu wrote: > Thanks Ralf, > > What If I would like to pass some arguments to xquery script > http://localhost:8984/rest?run=mult.xq<http://localhost:8984/rest?run=filen > ame.xq> > > Let suppose mult.xq has 2 external variables $a and $b defined and like to > pass their values when we call it. > > The url will be > > http://localhost:8984/rest?run=filename.xq?$a=444&$b=3333 > > ? > > This is giving error "ile or directory "mult.xq?a=21" not found." > > What is correct way of passing external variable values through rest url? > > > mult.xq: > ======= > > declare variable $a as xs:integer external; > declare variable $b as xs:integer external; > > return > <a> {$a * $b}</a> > > On Thu, Oct 6, 2011 at 11:09 AM, Ralf Jung <ralfjung-e at gmx.de> wrote: > > Hi, > > > > these queries load scripts from the database and execute them. > > To execute scripts from HTTPPATH, use something like > > http://localhost:8984/rest?run=filename.xq > > > > Kind regards, > > Ralf > > > > On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote: > > > Christian, > > > > > > I am trying to set up Basex HTTP server and run some xquery scripts > > > > through > > > > > REST style. > > > > > > In http://docs.basex.org/wiki/REST#Usage_Examples, we have example > > > http://localhost:8984/rest/factbook/index.xq to run index.xq scripts. > > > > > > Where are we keeping xquery scripts? > > > > > > In .basex configuration file, we have > > > > > > DBPATH = /Users/xxx/BaseXData > > > HTTPPATH = /Users/xxx/BaseXHTTP > > > REPOPATH = /Users/xx/BaseXRepo > > > > > > Which one is for folder that keeps xquery scripts? Above query returns > > > "Path does not exist." error. I have compiled the recent version of > > > Basex and use it on Mac OSX Lion 64 bit. > > > > > > Thanks > > > > > > Erol Akarsu > > > > _______________________________________________ > > BaseX-Talk mailing list > > BaseX-Talk at mailman.uni-konstanz.de > > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
EA
Erol Akarsuin reply to Ralf Jung, 6 Oct 2011, 17:096 Oct 2011 22:00 #
Thanks Ralf, What If I would like to pass some arguments to xquery script http://localhost:8984/rest?run=mult.xq<http://localhost:8984/rest?run=filename.xq> Let suppose mult.xq has 2 external variables $a and $b defined and like to pass their values when we call it. The url will be http://localhost:8984/rest?run=filename.xq?$a=444&$b=3333 ? This is giving error "ile or directory "mult.xq?a=21" not found." What is correct way of passing external variable values through rest url? mult.xq: =======
declare variable $a as xs:integer external;
declare variable $b as xs:integer external;

return
<a> {$a * $b}</a>
Quoted text · Ralf Jung · 40 lines
On Thu, Oct 6, 2011 at 11:09 AM, Ralf Jung <ralfjung-e at gmx.de> wrote: > Hi, > > these queries load scripts from the database and execute them. > To execute scripts from HTTPPATH, use something like > http://localhost:8984/rest?run=filename.xq > > Kind regards, > Ralf > > On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote: > > Christian, > > > > I am trying to set up Basex HTTP server and run some xquery scripts > through > > REST style. > > > > In http://docs.basex.org/wiki/REST#Usage_Examples, we have example > > http://localhost:8984/rest/factbook/index.xq to run index.xq scripts. > > > > Where are we keeping xquery scripts? > > > > In .basex configuration file, we have > > > > DBPATH = /Users/xxx/BaseXData > > HTTPPATH = /Users/xxx/BaseXHTTP > > REPOPATH = /Users/xx/BaseXRepo > > > > Which one is for folder that keeps xquery scripts? Above query returns > > "Path does not exist." error. I have compiled the recent version of Basex > > and use it on Mac OSX Lion 64 bit. > > > > Thanks > > > > Erol Akarsu > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery