Dear Dieter,
The problem is that you mixed up the BaseX server and a web server. You did in fact start the BaseX server, but your REST calls or WebDAV calls can not work, because no web server is running. Therefore, the BaseX HTTP services can be deployed in a servlet container, e.g. using Jetty. This is the servlet container BaseX comes with. Jetty will handle the REST calls and route this to BaseX, which executes the command or query and returns the result to Jetty, which will return the result to the client.
There is lots of documentation available how to deploy a servlet, but this depends on the servlet container you are using, so you have to check with them.
If you just want to get up and running, the easiest thing to use is Maven, at least in my humble opinion. Simply check out the BaseX-api source code at [GitHub] and run "mvn jetty:run" in the root directory. This will automatically start Jetty and deploy BaseX as a servlet, so Rest and RestXQ will work. Check out the documentation at [doc] to get more details.
If you want to develop some sort of web application I also recommend you to try out RestXQ, which is a very nice infrastructure to do so. Documentation is available at [RestXQ]
Please note, that you actually did not really ever work with the server, based on what you write. If you start the server from the GUI it still does not mean the GUI now serves as a client to the server. The client/server infrastructure and the GUI do not interact! I know this is quite confusing as you are able to start the server from the GUI, but instead the GUI still simply works in standalone mode. To use the client/server infrastructure you have to use the basexclient. See [Startup] for more information.
Unfortunately there is no book about BaseX yet - anyone want to write one? I'll buy it, for sure :-)
Hope this helps, Dirk
[GitHub] https://github.com/BaseXdb/basex-api [doc] http://docs.basex.org/wiki/Web_Application [RestXQ] http://docs.basex.org/wiki/RESTXQ [Startup] http://docs.basex.org/wiki/Startup#BaseX_Server
On Mon, Mar 11, 2013 at 2:42 PM, zanzinger@alice-dsl.de < zanzinger@alice-dsl.de> wrote:
Dear Sirs,
I am coming from the "content-side" of xml, therefore please excuse the maybe simple questions. (I did a lot xml, xslt, now xquery; a lot vba; a little objective C and C
- but not much client-cerver-things).
I am trying out BaseX-features. This is, what I´ve done so far:
- Installation (Mac-Version) was easy.
- Creating a Database via the GUI was easy.
- Testing XQuery in the GUI was easy as well.
- Now I tried the server: First I started the server with the
Gui-Menu-Commands: it works. Fine: I can access the Server by the Command-Line of the Gui, e.g. get an answer to the command "list" or get the answer on a "xQuery …" .
The Problem is now: I am searching an easy tutorial or explanation, how I can access the Server from a Browser (e.g. Safari), or for example from a loaded webpage in the browser, which has appropriate xml-/xquery/javascript-code to access the database (how do I write that cods?).
I already tried to connect to the server via Mac-webDAV: does not work, whereas from the Gui, I can connect to the server. In the Browser, I tried "http://localhost:1984/rest" :no response.
Is there any easy tutorial, how jetty interacts with baseX-server? Are there books on how to set up the client-server architecture of baseX?
Where (which directory) has a static html-page to be placed, which I can call via localhost? (That seemed to me the first simple step to access the server.) The next logical step would be to route the http:// - request to the database-server?! As far as I understand, this is done by the various APIs, e.g. php or node.js?
Hope, you understand my needs... I am very interested in baseX as the results so far seem very promising to me.
Thanks in advance for an answer (English or German).
Dieter Zanzinger München zanzinger@alice-dsl.de
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk