A Simple PROPFIND/PROPPATCH Client
Not many of the available WebDAV clients offer very sophisticated support for the two properties methods -- PROPFIND and PROPPATCH, and I wanted to write some site management utilities using these methods. So I finally sat down and started writing my own PROPFIND/PROPPATCH client.
I started with Ronald Tschalär's HTTPClient. HTTPClient doesn't support any of the WebDAV methods, but it includes a method called
My code provides two classes: a
To use this client, compile the two classes and put the class files into a directory included in your CLASSPATH. Type:
org.bcholmes.webdav.client.test.WebDAVTest PROPFIND http://localhost/dav/mypage.html test.xml
This command will send the
<?xml version="1.0" encoding="utf-8" ?> <D:propfind xmlns:D="DAV:"> <D:allprop/> </D:propfind>
I wrote this using version 1.3 of the Java Software Development Kit, although I don't think there's anything specific to that version in the code. It was tested on Windows 98, against a mod_dav implementation of WebDAV.
I was forced to change the
My JAR file
Copyright © 2000 by B.C. Holmes. Last updated: June 24th, 2000