Changes

Jump to navigation Jump to search
947 bytes removed ,  17:23, 26 October 2017
This page is part presents one of the [[Developer SectionWeb Application]]services. It describes how to use the WebDAV API of BaseXfile system interface.
BaseX offers access to the databases and documents using the [http://en.wikipedia.org/wiki/Webdav 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 implementation in BaseX is based on the [http://milton.io Milton library]. Currently, only Basic Authentication is supported.
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|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#BaseX_HTTP_Server|startup options]] page.=Usage=
==Accessing By default, the BaseX HTTP server makes the WebDAV==service accessible at {{Code|http://localhost:8984/webdav/}}. If no default credentials are specified, they will be requested by the client ([[Web Application#User Management|see further]]). It can be accessed by either <code>http:&#47;&#47;<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code>, depending on your WebDAV client.
The BaseX WebDAV Server Please note that the file size of XML documents will be displayed as 0 bytes, as the actual file size can only be accessed using either determined if the full document is being returned and serialized. This may cause problems with a <code>http:&#47;&#47;<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code> URL, depending on the used some WebDAV clientclients (e. By default, afterstarting the HTTP server, the following URL will be provided: <code>http://localhost:8984/webdav/</code>g. NetDrive or WebDrive).
==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_OptionsCommand-Line Options#BaseX_HTTP_Server|startup options]], WebDAV will not request additional user authentication from the client.
==WebDAV Clients=Root Directory=
===GNOME Nautilus===* In Nautilus choose File -> Connect to Server:[[File:webdav-nautilus01.png]]<br/>* Choose "the WebDAV (HTTP)" from the "Type" drop-down and enter the server addressroot directory, port and user credentials:[[File:webdav-nautilus02all existing databases are listed.png]]<br/>* After clicking "Connect" As new resources can only be stored inside a database, it is not possible to store files in the databases can root directory. If a file is copied on top level, a new database will be browsed:[[File:webdav-nautilus03created, which contains this resource.png]]<br/>
===KDE==Resources=
* KDE SC provides two file managers - Dolphin and Konqueror, which both support WebDAV using the "webdav://" URL prefix. Start Dolphin or Konqueror and enter the BaseX WebDAV URL (eg. webdav://localhost:8984/webdav):[[File:webdav-dolphin01.png]]<br/>* Enter the user credentials:[[File:webdav-dolphin02.png]]<br/>* After clicking "OK" the databases can be browsed:[[File:webdav-dolphin03.png]]<br/>==XML Documents==
===Mac OS X 10Uploaded files that start with an angle bracket will be stored as XML files. XML entities will be decoded during this process.4+===
* Mac OS X supports WebDAV since 10.4/Tiger* Open FinderIf a file is downloaded, choose Go -> Connect to Server:[[File:Webdav-osx-1.jpg]]* Enter BaseX WebDAV URL (eg. http://localhost:8984/webdav) - do not use webdav://-scheme! Press Connect:[[File:Webdav-osx-2.jpg]]* Enter the user credentials:[[File:Webdav-osx-3.jpg]]* That's it, now characters with the databases can following code points will be browsed:[[Fileencoded as entities:Webdav-osx-4.jpg]]
===oXygen Editor===* 160 (non-breaking space)* 8192–8207, 8232–8239, 8287–8303 (see http://www.w3schools.com/charsets/ref_utf_punctuation.asp)
Please have a look at our tutorial [[Integrating oXygen|How to integrate oXygen]] in BaseX.==Binary Files==
===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."<br/>[[File:Webdav-explorer01.png]]<br/><br/>* Click "Next"If XML parsing files, select "Choose a custom network location" and click "Next" again.<br/>[[File:Webdav-explorer03.png]]<br/><br/>* Enter or if the URL address first character of the BaseX WebDAV Server and click "Next".<br/>[[File:Webdav-explorer04.png]]<br/>If a message saying that the folder input is not validno angle bracket, this is because Microsoft WebClient is not configured to use Baseic HTTP authentication. Please check [http://support.microsoft.com/kb/928692/en this Microsoft article] in order to enable Basic HTTP authentication.<br/><br/>* Enter a name for the network location and click "Next".<br/>[[File:Webdav-explorer06.png]]<br/><br/>* The BaseX WebDAV can file will be accessed from the Explorer window.<br/>[[File:Webdav-explorer07stored as binary resource.png]]<br/>
===Windows XP==Locking=
* In the "My Network Places" view, double click on "Add Network Place":The BaseX WebDAV implementation supports locking. It can be utilized with clients which support this feature (e.g. [[oXygen|oXygen Editor]]). [Filehttp:WinXP01//tools.pngietf.org/html/rfc4918#section-6.2 EXCLUSIVE and SHARED]locks are supported, as well as [http://tools.ietf.org/html/rfc4918#section-7 WRITE]<br/>locks.* Confirm the upcoming introductory dialog:[[File'''Note:WinXP02.png]]''' WebDAV locks are stored in a database called <code>~webdav<br/code>* Select "Choose another network location" in . If the database is deleted, it will automatically be recreated along with the next dialoglock operations. If a resource remains locked, it can be unlocking by removing the correspondent <code><w:[[File:WinXP03.png]]lockinfo><br/code>entry. =WebDAV Clients=* Next, specify Please check out the BaseX following tutorials to get WebDAV URLrunning on different operating systems and with oXygen* [[FileWebDAV:WinXP04.pngWindows 7|Windows 7 and up]]<br/>* Enter the user/password combination to connect to the [[WebDAV service:Windows XP|Windows XP]]* [[FileWebDAV:WinXP05Mac OSX|Mac OSX 10.png4+]]<br/>* Assign a name to your [[WebDAV connection:GNOME|GNOME and Nautilus]]* [[FileWebDAV:WinXP06.pngKDE|KDE]]<br/>* Finish the wizard:[[File:WinXP07.pngIntegrating oXygen|oXygen Editor]]<br/> =Changelog= ;Version 7.7* You can now see all BaseX databases in the Windows ExplorerAdded:[[File:WinXP08.png#Locking|Locking]]<br/> ;Version 7.0* WebDAV API introduced
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu