first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

WSS: “Web Service Guidelines”; MSDN

The Windows SharePoint Services Web services provided by the Microsoft.SharePoint.SoapServer namespace include methods for accessing content on a Web site—such as for working with lists or site data—as well as methods for customizing meetings, imaging, document workspaces, or search.

SOAP interfaces used in these services provide Microsoft .NET Framework developers with object models for creating solutions that work with Windows SharePoint Services remotely from a client or custom application. The interfaces are defined through the server-side object model of the Microsoft.SharePoint assembly, and their design is optimized to reduce the number of roundtrips transacted between client computer and server.

Most Web services provide their functionality through the /_vti_bin virtual directory, which maps to the \\\\Program Files\\Common Files\\Microsoft Shared\\web Server extensions\\12\\ISAPI physical directory in the file system. The Administration Web service uses the /_vti_adm virtual directory, which maps to \\12\\ADMISAPI.

Note:

Windows SharePoint Services does not require the implementation of a particular version of SOAP. The SOAP response in any transaction with Windows SharePoint Services is managed by the .NET Framework.

Guidelines

You can create a project in Microsoft Visual Studio 2005, such as a Windows application or console application, that uses a Windows SharePoint Services Web service to interact with SharePoint site and list data. For introductory information about creating a project in Visual Studio that works within the context of Windows SharePoint Services, see Getting Started with Programmatically Customizing a SharePoint Web Site in Visual Studio. After you create a project, you must set a reference to the Web service you want to implement in your code, specifying the full path to the Web service in relation to the site containing the data.

To add a reference to a Windows SharePoint Services Web service in Visual Studio

  1. In Solution Explorer, right-click References, and then click Add WebReference.

  2. In the Add Web Reference dialog box, for URL, type the absolute URL for the Web service in the following format: A path that includes the Web site for which the Web service will be available.

    http://MyServer/[sites/][MySite/][MySubsite/]_vti_bin/Web_Service.asmx

If you are using methods in the Administration Web service, instead specify a path that goes to the administration port and that uses _vti_adm as the virtual directory, as follows:

http:// MyServer:Port_Number/_vti_adm/Admin.asmx
  1. Type a Web reference name, and then click Add Reference.

Instantiating a Service

Instantiate a Web service within code by using a constructor as follows:

Web_Reference_Name.Service_Name ServiceInstanceName =
    new Web_Reference _Name.Service_Name();

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

Establishing User Credentials

To establish system credentials for the current security context in which the application is running, add the following line after the previous line, which authenticates the user running the code by passing their default credentials to the Web service from the system credential cache.

[http://msdn.microsoft.com/en-us/library/ms458094.aspx]

mod date: 2009-09-09T04:49:14.000Z