Navigating the WebDAV Sample Application Source Code

Topic Last Modified: 2007-05-10

The source code for the WebDAV sample application is in webdavsample.htm. It is installed in the directory in which the Microsoft Exchange Server 2007 Software Development Kit (SDK) is installed, in the \Samples\webdav\ folder. The following table provides a list of the subprocedures that are relevant to using WebDAV Methods.

Subprocedure Description

cmdListProperties_OnClick()

Performs a PROPFIND Method operation of depth 1 on the resource listed in the txtTargetURL textbox. Calls the XMLHTTPStateChange sub-procedure to handle the data that is returned from the server.

cmdCopyResource_OnClick()

Copies the resource located at the URL in the txtTargetURL textbox to the URL in the txtDestinationURL textbox and displays the COPY Method response in the txtResponse textbox.

cmdDeleteResource_OnClick()

Deletes the resource located at the URL in the txtTargetURL textbox and displays the DELETE Method response in the txtResponse textbox.

cmdMoveResource_OnClick()

Moves the resource located at the URL in the txtTargetURL textbox to the collection at the URL in the txtDestinationURL textbox. Displays the MOVE Method response in the txtResponse textbox.

cmdMakeCollection_OnClick()

Creates a collection at the URL in the txtTargetURL textbox and displays the MKCOL Method response in the txtResponse textbox.

XMLHTTPStateChange

Checks the XMLHTTP.ReadyState property to determine whether all the data has been streamed to the client from the PROPFIND Method response. If no error is present in the response, an XML Document Object Model (DOM) document transforms the MLHTTP.XMLBody response into an HTML table by using the XSL template of the sample application.