Reputation: 2765
Whenever I add a web reference for any Sharepoint web service in VS 2008, the preview window while adding the web reference shows the proper method names:
Note CreateFolder:
Before: alt text http://img134.imageshack.us/img134/5286/vs20081bq7.png
And after, the CreateFolder method is not there
After http://img134.imageshack.us/img134/3530/vs20082be5.png
I looked over the documentation at
MSDN but it appears I am using it properly.
Can anybody point out my mistake? Thanks
Upvotes: 0
Views: 2384
Reputation: 14295
You need to create a reference to the Dws object in your code. Otherwise you can only see the static methods/types.
Try
DocumentWorkspace dw = new DocumentWorkspace();
dw.CreateFolder();
Not that normally I need to get a reference to a specific sites dws services, so adding the following code helps
dw.Credentials = [get the appropriate credentials, most often System.Net.CredentialCache.DefaultCredentials];
dw.Url = [basesiteurl] + "/_vti_bin/dw.asmx";
Upvotes: 1