This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

WebDAV Sample

The WebDAV Sample for connecting to WSO2 Governance Registry through Microsoft Visual Studio explains how you could easily read, write, update or delete resources and collections stored on the Governance Registry through Visual Studio.

Note

The WSO2 Governance Registry WebDAV API can be used to mount collections stored on the repository to your local filesystem.

See the following guidelines:

Pre - Requirements

To get the sample to work, you must first do the following:

1. Start the WSO2 Governance Registry by running the appropriate script from GREG_HOME/bin.

For Windows:

wso2server.bat --run

For Linux:

sh wso2server.sh

See Running the Product on Windows or Running the Product on Linux and Solaris.

Tip

Though this sample will only work in a Windows environment, the WSO2 Governance Registry server can run on a Linux Server.

2. Install Microsoft Visual Studio. Please read more information on installing Microsoft Visual Studio 2010.

Info

This sample of WSO2 Governance Registry has been tested on Microsoft Visual Studio 2010, but also applies to other versions of the IDE.

3. Create a WebDAV mount to WSO2 Governance Registry on your Windows filesystem. See Using WebDAV on Windows for more information.

Steps to get this sample to work

1. Launch Visual Studio and select the Open Web Site option on the File menu.

2. Select the Z drive (or the drive that you created to connect to Governance Registry).

3. Now click on the Open button to create a connection to WSO2 Governance Registry from within Visual Studio.

You should now see the /_system collection of the WSO2 Governance Registry from within the Visual Studio Solution Explorer.

Creating Resources and Collections

1. Right-click on the label Z:\ and select New Folder to create a new collection.

2. Give the folder the name Visual Studio.

3. Right-Click Visual Studio and select Add New Item.

4. Select Text File as the file type to create a resource of type text/plain with the default name TextFile.txt.

5. Click the Add button to add the text resource to the WSO2 Governance Registry.

6. Right-click Visual Studio and select the Refresh Folder option.

7. Right-click on TextFile.txt and select the Open option.

8. Once the file opens, you can type some text through the Visual Studio text editor.

9. Click the save button to update the resource contents on the WSO2 Governance Registry.

10. Select the Save button on the Save File As dialog box.

11. Confirm the Save As operation by clicking on the Yes button.

You now can navigate to the Resource Browser of WSO2 Governance Registry and find the collection and the resource you created. See Managing the Resources for more information.