Using WebDAV server from VB

Just as a try out I builded a small demo sample that talks to Tamino WebDAV server.

You will find a lot of simple functions like retrieving resources, updating resources, locking resources, retrieving properties…

I wrapped these functions in a COM object (still part of executable, but it should not be to difficult to make a separate COM server).

There are still a few functions missing like MKCOL, MOVE and COPY. I will add these functions at a later stage.

This should get you going :wink:
Tamino_WebDAV_Client.zip (31.4 KB)

Hi,

I tried your vb program. However, some functions could not work properly. I specified the resource path and click “Get resource”. All XML doc were shown and I tried the “GET/MODIFY” buttons, I got error “the specified Path/file name cannot be accessed or is invalid” or “file not found”. What’s the error?

Besides, what were the function of button “Property names” & “All properties” ? :confused:

Hi Tony,

Which resource are you trying to GET. This must be
a XML resource.

So if you would start out with a blanco resource you would get your collections. Click on collections and you’ll get your document types. Then click on a document type to get your documents. That would be something like Document_1.xml, Document_2.xml etcetera.

If you select a document and then click on GET Document the document will be retrieved and saved in c:\data<something>. Probably you need to change this to C:\TEMP or use Environ$(“TEMP”) which points to your temporary directory.

This same file is used as input in order to modify your document. Here it probably goes wrong.

The only thing that you need to do is to change Const XMLFILENAME = "c:\data\result.xml"
to an existing location, e.g. “c:\temp\result.xml”.

I use
Const PROPNAME = "<?xml version='1.0'?>"
to get all property names and
Const ALLPROP = "<?xml version='1.0'?>"
to retrieve all properties of the specified resource.

Have a look at http://asg.web.cmu.edu/rfc/rfc2518.html, chapter 8 for some examples.

BTW the intention of this example is to get some insight about how the WebDAV interfaces works, nothing else. I you want to build your own WebDAV COM class, then please do so (and do not forget to send a copy to this list ;-).

Hope this helps,
Rudolf