Changes

Jump to navigation Jump to search
1,227 bytes removed ,  10:54, 21 January 2019
no edit summary
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. Initial user name and password are both set to <code>admin</code>. 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=
Some tutorials In the WebDAV root directory, all existing databases are available listed. As new resources can only be stored inside a database, it is not possible to get WebDAV running with different tools and operating systems:store files in the root directory. If a file is copied on top level, a new database will be created, which contains this resource.
=Resources= ==XML Documents== Uploaded files that start with an angle bracket will be stored as XML files. XML entities will be decoded during this process. If a file is downloaded, the characters with the following code points will be encoded as entities: * [[WebDAV/Windows 7|Windows 7]]160 (non-breaking space)* [[WebDAV8192–8207, 8232–8239, 8287–8303 (see http:/Windows XP|Windows XP]]* [[WebDAV/Mac OSX|Mac OSX 10www.4+]]* [[WebDAVw3schools.com/charsets/GNOME|GNOME and Nautilus]]ref_utf_punctuation.asp)* [[WebDAV/KDE|KDE]]* [[Integrating oXygen|oXygen Editor]]==Binary Files==
===GNOME Nautilus===* In Nautilus choose File -> Connect to Server:[[File:webdav-nautilus01.png]]<br/>* Choose "WebDAV (HTTP)" from If XML parsing files, or if the "Type" drop-down and enter first character of the server addressinput is no angle bracket, port and user credentials:[[File:webdav-nautilus02.png]]<br/>* After clicking "Connect" the databases can file will be browsed:[[File:webdav-nautilus03stored as binary resource.png]]<br/>
===KDE==Locking=
* KDE SC provides two file managers - Dolphin and Konqueror, The BaseX WebDAV implementation supports locking. It can be utilized with clients which both support WebDAV using the "webdavthis feature (e.g. [[oXygen|oXygen Editor]]). [http://" URL prefixtools. Start Dolphin or Konqueror and enter the BaseX WebDAV URL (egietf. webdav:/org/localhost:8984html/webdav):[[File:webdavrfc4918#section-dolphin016.png2 EXCLUSIVE and SHARED]]<br/>* Enter the user credentials:[locks are supported, as well as [Filehttp:webdav-dolphin02//tools.ietf.png]]<brorg/html/>* After clicking "OK" the databases can be browsed:[[File:webdavrfc4918#section-dolphin037 WRITE] locks.png]]<br/>
===Mac OS X 10'''Note:''' WebDAV locks are stored in a database called <code>~webdav</code>. If the database is deleted, it will automatically be recreated along with the next lock operations. If a resource remains locked, it can be unlocking by removing the correspondent <code><w:lockinfo></code> entry.4+===
* Mac OS X supports =WebDAV since 10.4/Tiger* Open Finder, 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 the databases can be browsed:[[File:Webdav-osx-4.jpg]]Clients=
===Please check out the following tutorials to get WebDAV running on different operating systems and with oXygen Editor===:
Please have a look at our tutorial * [[WebDAV: Windows 7|Windows 7 and up]]* [[WebDAV: Windows XP|Windows XP]]* [[WebDAV: Mac OSX|Mac OSX 10.4+]]* [[WebDAV: GNOME|GNOME and Nautilus]]* [[WebDAV: KDE|KDE]]* [[Integrating oXygen|How to integrate oXygenEditor]] in BaseX.
=Changelog==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", select "Choose a custom network location" and click "Next" again.<br/>[[File:Webdav-explorer03.png]]<br/><br/>* Enter the URL address of the BaseX WebDAV Server (e.g. <code>http://localhost:8984/webdav</code>) and click "Next".<br/>[[File:Webdav-explorer04.png]]<br/>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 [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 be accessed from the Explorer window.<br/>[[File:Webdav-explorer07.png]]<br/>
===Windows XP===;Version 7.7* Added: [[#Locking|Locking]]
* In the "My Network Places" view, double click on "Add Network Place":[[File:WinXP01.png]]<br/>* Confirm the upcoming introductory dialog:[[File:WinXP02.png]]<br/>* Select "Choose another network location" in the next dialog:[[File:WinXP03.png]]<br/>* Next, specify the BaseX WebDAV URL:[[File:WinXP04.png]]<br/>* Enter the user/password combination to connect to the WebDAV service:[[File:WinXP05;Version 7.png]]<br/>0* Assign a name to your WebDAV connection:[[File:WinXP06.png]]<br/>* Finish the wizard:[[File:WinXP07.png]]<br/>* You can now see all BaseX databases in the Windows Explorer:[[File:WinXP08.png]]<br/>API introduced
administrator, editor
162

edits

Navigation menu