Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About Web_Reference_Folder

I see Web_Reference_Folder being used in Sharepoint code examples but have no idea what it is.

What is Web_Reference_Folder? and How do I access it or consume it?

Code Example from (http://msdn.microsoft.com/en-us/library/lists.lists.checkoutfile(v=office.12).aspx):

Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
string fileCheckout = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt";
like image 583
Xariex Avatar asked Mar 15 '26 06:03

Xariex


2 Answers

Have a look at this msdn blog post , maybe it helps.

Some context about Web_Reference_Folder from the post:

Web_Reference_Folder_Name represents the folder name used for the reference to the Web service in Visual Studio .NET, and Service_Name represents the name of the class providing methods that can be called through the Web service.

like image 107
Anders Aune Avatar answered Mar 16 '26 20:03

Anders Aune


When you want to use SharePoint web services in your code, you have to add web reference of the service in your project. Generally it is done by right click > Add web reference and then provide http:///_vti_bin/Lists.asmx?wsdl. That will generate a new web reference folder having appropriate classes that you can use to call the service.

Now say for example you used name localhost while adding web reference, it will add localhost folder in your project under web reference.

So, in that case your code should be localhost.Lists listService = new localhost.Lists();

like image 30
Prashant Lakhlani Avatar answered Mar 16 '26 22:03

Prashant Lakhlani