WebDAV

From BaseX Documentation
Revision as of 10:33, 17 October 2011 by Dimitar (talk | contribs) (Added instructions for GNOME Nautilus)
Jump to navigation Jump to search

This page is part of the Developer Section. It describes how to use the WebDAV API of BaseX.

BaseX offers access to the databases and documents using the WebDAV protocol. WebDAV provides convenient means to access and edit XML documents by representing BaseX databases and documents in the form of a file system hierarchy.

Starting WebDAV

The WebDAV implementation of BaseX is provided by a module (servlet) which runs in the BaseX HTTP server. Please check the Startup: BaseX HTTP Server page for details on how to start the HTTP Server. The WebDAV service can either use the local databases or connect to a remote BaseX Server, as described in the startup options page.

Accessing WebDAV

The BaseX WebDAV Server can be accessed using either with a http://<httphost>:<httpport>/webdav/ or webdav://<httphost>:<httpport>/webdav/ URL, depending on the used WebDAV client. By default, after starting the HTTP server, the following URL will be provided: http://localhost:8984/webdav/.

Authorization

The WebDAV service uses the database user credentials in order to perform authentication and authorization. If database user and password are explicitly specified when starting the BaseX HTTP Server using the corresponding startup options, WebDAV will not request additional user authentication from the client.

WebDAV Clients

oXygen Editor

Please have a look at our tutorial How to integrate oXygen in BaseX.

Windows 7

  • Open "Map network drive..." by right-clicking on "My Computer"
  • Click on the link "Connect to a Web site that you can use to store your documents and pictures."

Webdav-explorer01.png

  • Click "Next", select "Choose a custom network location" and click "Next" again.

Webdav-explorer03.png

  • Enter the URL address of the BaseX WebDAV Server and click "Next".

Webdav-explorer04.png
If a message saying that the folder is not valid, this is because Microsoft WebClient is not configured to use Baseic HTTP authentication. Please check this Microsoft article in order to enable Basic HTTP authentication.

  • Enter a name for the network location and click "Next".

Webdav-explorer06.png

  • The BaseX WebDAV can be accessed from the Explorer window.

Webdav-explorer07.png

Windows XP

  • In the "My Network Places" view, double click on "Add Network Place":

WinXP01.png

  • Confirm the upcoming introductory dialog:

WinXP02.png

  • Select "Choose another network location" in the next dialog:

WinXP03.png

  • Next, specify the BaseX WebDAV URL:

WinXP04.png

  • Enter the user/password combination to connect to the WebDAV service:

WinXP05.png

  • Assign a name to your WebDAV connection:

WinXP06.png

  • Finish the wizard:

WinXP07.png

  • You can now see all BaseX databases in the Windows Explorer:

WinXP08.png

GNOME Nautilus

  • In Nautilus choose File -> Connect to Server:

Webdav-nautilus01.png

  • Choose "WebDAV (HTTP)" from the "Type" drop-down and enter the server address, port and user credentials:

Webdav-nautilus02.png

  • After clicking "Connect" the databases can be browsed:

Webdav-nautilus03.png