I'm hoping to find a step-by-step 'hello world' example for using the BaseX REST interface. To clarify, I want to be able to:
1. Start the REST service. ==========================
When I start the BaseX server by doing;
C:>java -cp basex-6.3.jar org.basex.BaseXServer -s
does that also start the REST service?
2. Test the rest service. =========================
How can I test if the REST service is running on localhost? Pointing a browser at http://localhost:8984/basex/jax-rx/ returns the following error;
error on line 1 at column 1: Document is empty
If I 'View Source' for that page in the browser, the source is just;
Connection refused: connect
3. Using REST. ============== How do I create a restful interface? Say I want to create a REST API that simply does the following;
An HTTP GET to locahost:8984/basex/jax-rx/foo/ returns <hello/> An HTTP GET to locahost:8984/basex/jax-rx/bar/ returns <world/>
How do I build that interface? What are the steps? Are 'foo' and 'bar' collections? What's the overall structure?
4. Documentation ================ I know that formal documentation is a bit thin on the ground, but would anyone be willing to send me their own informal personal notes about BaseX REST? I am currently struggling to even get started with the BaseX REST API.
Nigel
basex-talk@mailman.uni-konstanz.de