No, you don't want to change your %rest:path() annotation. You _never_ put anything like http://localhost into your %rest:path() annotation. The URLs I have given are the URLs you have to enter in your browser to access this functions. On 16/01/14 11:46, e-letter wrote:
On 16/01/2014, Dirk Kirsten <dk@basex.org> wrote:
Given your configuration, you can access these functions using the following URLs: - For %rest:path("{$x}") it can be anything like http://localhost:8984/test or http://localhost:8984/test2 and test (or test2) will be bound to the variable $x - For %rest:path("xmldatabasefile.xml/bookstore/book") it will be http://localhost:8984/xmldatabasefile.xml/bookstore/book
The urls were enclosed in quotation marks:
... %rest:path("http://localhost:8984/test") ... %rest:path("http://localhost:8984/xmldatabasefile.xml/bookstore/book") ...
The server response:
HTTP ERROR 400
Problem accessing /. Reason: Stopped at /path/to/webapp/restxq.xqm, 17/10: [BASX0003] Variable $x is not assigned by the annotations.
Powered by Jetty://
What are these annotations please?
-- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22