|
3 | 3 | schematypens="http://purl.oclc.org/dsdl/schematron"?><article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
|
4 | 4 | <info>
|
5 | 5 | <title>WebDAV</title>
|
6 |
| - <date>2Q19</date> |
| 6 | + <date>1Q20</date> |
7 | 7 | <keywordset>
|
8 | 8 | <keyword>getting-started</keyword>
|
9 | 9 | <keyword>interfaces</keyword>
|
|
16 | 16 | WebDAV makes it possible to manage database collections and documents just like directories and
|
17 | 17 | files in a file system. You can copy, move, delete, view or edit files with any application
|
18 | 18 | supporting the WebDAV protocol, including Windows Explorer, macOS Finder, <link xlink:href="http://www.webdav.org/cadaver" condition="_blank">cadaver</link>, <link xlink:href="https://www.konqueror.org/" condition="_blank">KDE Konqueror</link>, <link xlink:href="https://www.oxygenxml.com/" condition="_blank">oXygen XML Editor</link>, <link xlink:href="https://www.altova.com/" condition="_blank">XML Spy</link>, <link xlink:href="https://www.libreoffice.org/" condition="_blank">LibreOffice</link> and many others (see <xref linkend="compatibility"/>
|
19 |
| - below).</para> |
20 |
| - <para>In the default configuration the WebDAV server can be accessed via the URLs <literal>http://localhost:8080/exist/webdav/db/</literal> and <literal>http://localhost:8443/exist/webdav/db/</literal> (since eXist-db 2.0). </para> |
| 19 | + below). The interface has been implemented with excellent open-source <link xlink:href="http://milton.io" condition="_blank">Milton</link> WebDAV API for Java.</para> |
| 20 | + <para>In the default configuration the WebDAV server can be accessed via the URLs <literal>http://localhost:8080/exist/webdav/db/</literal> and <literal>http://localhost:8443/exist/webdav/db/</literal>.</para> |
21 | 21 |
|
22 | 22 | <!-- ================================================================== -->
|
23 | 23 |
|
24 | 24 | <sect1 xml:id="compatibility">
|
25 | 25 | <title>Compatibility</title>
|
26 |
| - |
27 |
| - <para>The <link xlink:href="http://milton.io" condition="_blank">Milton</link> project, on which eXist-db's WebDAV implementation is |
28 |
| - build, maintains a detailed WebDAV client compatibility list that describes a "Recipe for |
29 |
| - broad client compatibility." In case of any problems please read this document. Some |
30 |
| - preliminary points specific to eXist should be kept in mind:</para> |
31 | 26 | <itemizedlist>
|
32 | 27 | <listitem>
|
33 |
| - <para>For Windows 7 see notes below and the Milton documentation.</para> |
34 |
| - </listitem> |
35 |
| - <listitem> |
36 |
| - <para>eXist's Milton based WebDAV interface does currently not support HTTP Digest |
37 |
| - Authentication.</para> |
| 28 | + <para>eXist's Milton based WebDAV interface does not support HTTP Digest Authentication.</para> |
38 | 29 | </listitem>
|
39 | 30 | <listitem>
|
40 |
| - <para>The size of an XML document is presented as a multiple of 4096 bytes, which is eXist's |
| 31 | + <para> |
| 32 | + The size of an XML document is presented as a multiple of 4096 bytes, which is eXist's |
41 | 33 | internal pagesize (see <link xlink:href="configuration#conf.xml">conf.xml</link>). The actual size of an XML
|
42 | 34 | document stored in the database can not be determined because the size depends on many
|
43 |
| - factors, among which the serialization parameters applied.</para> |
| 35 | + factors, e.g. the applied serialization parameters.</para> |
44 | 36 | </listitem>
|
| 37 | + <listitem><para>A webdav client / enabled application may or may not work with the webdav server of eXist-db, depending on the quality of the implementation of the client. The server fullfills all requirements of the webdav <link xlink:href="https://tools.ietf.org/html/rfc2518">specification</link>.</para></listitem> |
45 | 38 | </itemizedlist>
|
46 |
| - <para>The Milton-based WebDAV interface has been successfully tested with: Windows Web Folders |
47 |
| - (Windows XP/7), <link xlink:href="https://www.jscape.com/products/file-transfer-clients/anyclient/" condition="_blank">AnyClient</link> (cross-platform), macOS Finder, <link xlink:href="https://www.panic.com/transmit/" condition="_blank">Transmit</link> (macOS), <link xlink:href="https://cyberduck.ch/" condition="_blank">Cyberduck</link>, davfs2 version 1.4.5 |
48 |
| - (Linux), OxygenXML and LibreOffice.</para> |
49 |
| - <para>The following clients are reported to have issues: <link xlink:href="https://en.wikipedia.org/wiki/GVFS" condition="_blank">GVFS</link> (Nautilus) and <link xlink:href="https://www.netdrive.net/" condition="_blank">NetDrive</link>. However, this can change over time!</para> |
50 |
| - </sect1> |
51 |
| - |
52 |
| - <!-- ================================================================== --> |
53 |
| - |
54 |
| - <sect1 xml:id="clients"> |
55 |
| - <title>Clients</title> |
56 |
| - |
57 |
| - |
58 |
| - |
59 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
60 |
| - |
61 |
| - <sect2 xml:id="webfolders"> |
62 |
| - <title>Windows Web Folders</title> |
63 |
| - |
64 |
| - <para>Out of the box, Windows has <emphasis>some</emphasis> native support for the WebDAV |
65 |
| - protocol, but there are some well-known issues. Please consult the following:</para> |
66 |
| - <itemizedlist> |
67 |
| - <listitem> |
68 |
| - <para>Be aware that there are multiple versions of WebDAV Microsoft libraries (and |
69 |
| - different flavors of bugs). See <link xlink:href="https://greenbytes.de/tech/webdav/webfolder-client-list.html" condition="_blank">Web Folder Client (MSDAIPP.DLL) Versions and Issues</link>.</para> |
70 |
| - </listitem> |
71 |
| - <listitem> |
72 |
| - <para>Windows Vista and Windows 7 both restrict access to WebDAV servers that use Basic |
73 |
| - HTTP authentication on non-SSL connections. This restriction can be solved by changing a |
74 |
| - registry key. Read more on <link xlink:href="https://support.microsoft.com/kb/841215" condition="_blank">MSDN</link> and |
75 |
| - <link xlink:href="https://greenbytes.de/tech/webdav/webdav-redirector-list.html" condition="_blank">greenbytes.de</link>. However, SSL connections do bring improved |
76 |
| - security.</para> |
77 |
| - </listitem> |
78 |
| - </itemizedlist> |
79 |
| - |
80 |
| - |
81 |
| - |
82 |
| - <para>To use WebDAV in Internet explorer:</para> |
83 |
| - <itemizedlist> |
84 |
| - <listitem> |
85 |
| - <para>Select <guimenuitem>File -> Open</guimenuitem>.</para> |
86 |
| - </listitem> |
87 |
| - <listitem> |
88 |
| - <para>Fill in URL, for instance <literal>http://localhost:8080/exist/webdav/db/</literal> |
89 |
| - or <literal>https://localhost:8443/exist/webdav/db/</literal>.</para> |
90 |
| - </listitem> |
91 |
| - <listitem> |
92 |
| - <para>Check <guimenuitem>Open as Web Folder</guimenuitem>.</para> |
93 |
| - </listitem> |
94 |
| - <listitem> |
95 |
| - <para>Click <guimenuitem>Ok</guimenuitem>.</para> |
96 |
| - </listitem> |
97 |
| - </itemizedlist> |
98 |
| - </sect2> |
99 |
| - |
100 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
101 |
| - |
102 |
| - <sect2 xml:id="macos"> |
103 |
| - <title>macOS Finder</title> |
104 |
| - |
105 |
| - <para>The eXist-db database can be accessed easily with the macOS Finder using the |
106 |
| - <guimenuitem>Go, Connect to Server...</guimenuitem> menu. Use the eXist-db WebDAV URL |
107 |
| - <code>http://localhost:8080/exist/webdav/db/</code>.</para> |
108 |
| - |
109 |
| - <note> |
110 |
| - <para>In some previous MacOS releases, Apple repetitively changed their WebDAV |
111 |
| - implementation significantly, introducing new bugs and problems. The main issue is that |
112 |
| - Finder requires exact document sizes reported for PROPFIND where eXist-db by default |
113 |
| - reports an estimated size as described above.</para> |
114 |
| - <para>As a workaround, eXist-db detects the MacOS finder via the "user-agent" HTTP header |
115 |
| - and switches for PROPFIND into a kind of MacOS compatibility mode, where all XML documents |
116 |
| - in a collection are serialized to determine the exact sizes of these documents. This is a |
117 |
| - rather expensive and time consuming operation for large documents and for collections with |
118 |
| - many documents.</para> |
119 |
| - <para>As an alternative it is recommended to use <link xlink:href="https://www.panic.com/transmit/" condition="_blank">Transmit</link> or <link xlink:href="https://cyberduck.ch/" condition="_blank">Cyberduck</link> instead.</para> |
120 |
| - <para>For macOS 10.8 the WebDAV client has become functional (again) in 10.8.2, but still |
121 |
| - the client does not work perfectly, for instance at bulk operations.</para> |
122 |
| - </note> |
123 |
| - </sect2> |
124 |
| - |
125 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
126 |
| - |
127 |
| - <sect2 xml:id="oxygenxml"> |
128 |
| - <title>oXygen XML Editor</title> |
129 |
| - |
130 |
| - <itemizedlist> |
131 |
| - <listitem> |
132 |
| - <para>Select <literal>File -> Open URL</literal>.</para> |
133 |
| - </listitem> |
134 |
| - <listitem> |
135 |
| - <para>Fill <literal>User</literal> and <literal>Password</literal>.</para> |
136 |
| - </listitem> |
137 |
| - <listitem> |
138 |
| - <para>Enter <literal>Server URL</literal> http://localhost:8080/exist/webdav/db/.</para> |
139 |
| - </listitem> |
140 |
| - <listitem> |
141 |
| - <para>Click <literal>Browse</literal>.</para> |
142 |
| - </listitem> |
143 |
| - </itemizedlist> |
144 |
| - <informalfigure> |
145 |
| - <mediaobject> |
146 |
| - <imageobject> |
147 |
| - <imagedata fileref="assets/webdav_oxygen.png"/> |
148 |
| - </imageobject> |
149 |
| - </mediaobject> |
150 |
| - </informalfigure> |
151 |
| - <para> More info on the <link xlink:href="https://www.oxygenxml.com/xml_editor/ftp_webdav.html/" condition="_blank">oXygen</link> product pages. </para> |
152 |
| - <note> |
153 |
| - <para>Note on SSL connections in oXygen: You may encounter an error: <emphasis>"Error: |
154 |
| - sun.security.validator.ValidatorException: PKIX path building failed: |
155 |
| - sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid |
156 |
| - certification path to requested target."</emphasis> |
157 |
| - </para> |
158 |
| - <para>In order to avoid this error, you'll need to add the Server certificate to your |
159 |
| - trusted certificates keystore (<link xlink:href="https://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#CustomizingStores" condition="_blank">more info</link>).</para> |
160 |
| - </note> |
161 |
| - <warning> |
162 |
| - <para>When saving a document to the WebDAV server via oXygen, remember to double check that |
163 |
| - the document's path in the File URL field at the top of the dialog does really contain the |
164 |
| - URL to which you want to save the document to. It happens too easily that when you click |
165 |
| - on another folder or resource by mistake, you overwrite the wrong resource. </para> |
166 |
| - </warning> |
167 |
| - </sect2> |
168 |
| - |
169 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
170 |
| - |
171 |
| - <sect2 xml:id="davfs2"> |
172 |
| - <title>davfs2</title> |
173 |
| - <para>By default, non-XML files (plain text files, images, etc) are working as expected with davfs2. |
174 |
| - Because eXist-db reports the size of XML documents as a multiple of the internal pagesize, you can list XML files |
175 |
| - (<code>ls -l</code>) but you cannot view or edit them. The davfs2 logs (syslog/journalctl) contain: |
176 |
| - <literal>Could not read response body: connection was closed by server</literal> |
177 |
| - </para> |
178 |
| - <para> |
179 |
| - In order to access XML files stored in eXist from a mounted directory in a filesystem via dafvs2, |
180 |
| - have to add the following additional Java parameters when starting eXist:</para> |
181 |
| - <itemizedlist> |
182 |
| - <listitem><para><literal>org.exist.webdav.PROPFIND_METHOD_XML_SIZE=EXACT</literal></para></listitem> |
183 |
| - <listitem><para><literal>org.exist.webdav.GET_METHOD_XML_SIZE=EXACT</literal></para></listitem> |
184 |
| - </itemizedlist> |
185 |
| - |
186 |
| - <programlisting xlink:href="listings/listing-2.txt"/> |
187 |
| - |
188 |
| - <warning><para><literal>NULL</literal> and <literal>APPROXIMATE</literal> values work for Oxygen and Cadaver but only <literal>EXACT</literal> can be used with davfs2.</para></warning> |
189 |
| - |
190 |
| - <para>You must first uninstall the service <emphasis role="bold">before</emphasis> |
191 |
| - modifying <literal>wrapper.conf</literal>, for changes to be applied when reinstalling: |
192 |
| - </para> |
193 |
| - |
194 |
| - <orderedlist> |
195 |
| - <listitem> |
196 |
| - |
197 |
| - <para>Uninstall (with service name <emphasis>eXist-db</emphasis>)</para> |
198 |
| - |
199 |
| - <programlisting xlink:href="listings/listing-3.txt"/> |
200 |
| - |
201 |
| - </listitem> |
202 |
| - <listitem> |
203 |
| - |
204 |
| - <para>Reinstall and enable</para> |
205 |
| - |
206 |
| - <programlisting xlink:href="listings/listing-4.txt"/> |
207 |
| - |
208 |
| - </listitem> |
209 |
| - </orderedlist> |
210 |
| - |
211 |
| - <note><title>Linux</title><para>Tested on davfs2 1.4.7 on RHEL7.5 and 1.5.4 on Arch Linux.</para></note> |
212 |
| - |
213 |
| - </sect2> |
214 |
| - |
215 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
216 |
| - |
217 |
| - <sect2 xml:id="kde"> |
218 |
| - <title>KDE Konqueror</title> |
219 |
| - |
220 |
| - <para>Enter an URL like <literal>webdav://localhost:8080/exist/webdav/db</literal>. Use |
221 |
| - <literal>webdavs://</literal> for WebDAV over SSL. </para> |
222 |
| - <informalfigure> |
223 |
| - <mediaobject> |
224 |
| - <imageobject> |
225 |
| - <imagedata fileref="assets/webdav_konqueror.png"/> |
226 |
| - </imageobject> |
227 |
| - </mediaobject> |
228 |
| - </informalfigure> |
229 |
| - </sect2> |
230 |
| - |
231 |
| - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
232 |
| - |
233 |
| - <sect2 xml:id="libreoffice"> |
234 |
| - <title>LibreOffice</title> |
235 |
| - |
236 |
| - <para>For LibreOffice and OpenOffice.org the recommended way for opening documents stored in |
237 |
| - eXist-db is using the 'native' WebDAV client, as documented in the <link xlink:href="https://help.libreoffice.org/Common/Opening_a_Document_Using_WebDAV_over_HTTPS" condition="_blank">LibreOffice Help</link> documentation.</para> |
238 |
| - <warning> |
239 |
| - <para>When using LibreOffice on MacOS, do not write documents to a network share that is |
240 |
| - mounted via Finder as documented earlier, since this could corrupt your database. The |
241 |
| - problem has been identified but there is no solution yet. Please use the alternative |
242 |
| - described in this chapter.</para> |
243 |
| - </warning> |
244 |
| - <para>The first step is configuring LibreOffice to use the LibreOffice Open/Save dialogs, |
245 |
| - instead of the dialogs that are provided by the operating system: </para> |
246 |
| - <informalfigure> |
247 |
| - <mediaobject> |
248 |
| - <imageobject> |
249 |
| - <imagedata fileref="assets/webdav_libreoffice_settings.gif"/> |
250 |
| - </imageobject> |
251 |
| - </mediaobject> |
252 |
| - </informalfigure> |
253 |
| - <para> Now it is possible to type an URL in the <guimenuitem>File, Open</guimenuitem> dialog. |
254 |
| - Enter <code>http://localhost:8080/exist/webdav/db/</code> and provide your login |
255 |
| - credentials. Now the dialog box shows the content of the database: </para> |
256 |
| - <informalfigure> |
257 |
| - <mediaobject> |
258 |
| - <imageobject> |
259 |
| - <imagedata fileref="assets/webdav_libreoffice_open.gif"/> |
260 |
| - </imageobject> |
261 |
| - </mediaobject> |
262 |
| - </informalfigure> |
263 |
| - </sect2> |
264 | 39 | </sect1>
|
265 | 40 |
|
266 |
| - <!-- ================================================================== --> |
267 |
| - |
268 | 41 | <sect1 xml:id="serialization">
|
269 | 42 | <title>Serialization</title>
|
270 | 43 |
|
271 |
| - <para> When retrieving an XML document via the WebDAV interface, the default serialization |
272 |
| - settings as defined in <link xlink:href="configuration#conf.xml">conf.xml</link> are used. It is however possible to |
273 |
| - define custom serialization settings specific for the WebDAV interface. </para> |
274 |
| - <para> Copy the file <literal>extensions/webdav/src/main/resources/webdav.properties</literal> |
| 44 | + <para>When retrieving an XML document via the WebDAV interface, the default serialization |
| 45 | + settings as defined in <link xlink:href="configuration#conf.xml">conf.xml</link> are effective. It is possible to define custom serialization settings specific for the WebDAV interface. </para> |
| 46 | + <para> |
| 47 | + Copy the file <literal>extensions/webdav/src/main/resources/webdav.properties</literal> |
275 | 48 | into <literal>$EXIST_HOME/etc</literal> directory and uncomment/modify the parameters. Changes
|
276 | 49 | in this file requires a restart of eXist-db. </para>
|
277 | 50 |
|
|
0 commit comments