Udostępnij za pośrednictwem


The Quick Web Service Guide

The Quick Web Service Guide

The Windows SharePoint Services Web Services provided in the Microsoft.SharePoint.SoapServer namespace provide numerous methods for accessing site content. These include methods for working with lists, site data as well as methods for customizing meeting, document workspaces, imaging and search. The Simple Object Access Protocol (SOAP) interfaces used in these services provide .NET developers with object models that are used to create solutions that work with both WSS and SPS. The Web Service interfaces are integrated with the server-side object models of the Windows SharePoint Services assembly, and their design has been optimized to reduce the number of roundtrips transacted between client computer and server.

Web services provide their functionality through the _vti_bin virtual directory, which maps to the Local_Drive:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions60ISAPI physical directory in the file system.

Adding a reference

To create a reference within a Microsoft Visual Studio .NET project to a Web service in Windows SharePoint Services, right-click References in Solution Explorer and click Add Web Reference in the shortcut menu. In the address bar of the Add Web Reference browser, enter the Web service address as shown below.

https://Virtual_Server/[sites/][Site_Name/][Subsite_Name/]_vti_bin/Service_Name.asmx

Methods that are part of the Administrative service specify a path that goes to the administration port and uses the _vti_adm as the virtual directory, as shown below.

https://Virtual_Server:Port_Number/_vti_adm/Admin.asmx

Instantiating a service

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

Web_Reference_Folder_Name.Service_Name ServiceInstanceName = new Web_Reference_Folder_Name.Service_Name();

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.

Establishing user credentials

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

[Visual Basic .NET]

ServiceInstanceName.Credentials = System.Net.CredentialCache.DefaultCredentials

The List

Administration Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name:Port_Number/_vti_adm/Admin.asmx

Alerts Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Alerts.asmx

Document Workspace Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/_vti_bin/Dws.asmx

Forms Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Forms.asmx

Imaging Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/_vti_bin/Imaging.asmx

List Data Retrieval Web Service

Namespace: Microsoft.SharePoint.Dsp.Sts

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Dsp.Sts (in Microsoft.SharePoint.Dsp.Sts.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/DspSts.asmx

Lists Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Lists.asmx

Meetings Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/_vti_bin/Meetings.asmx

Permissions Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx

Site Data Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/SiteData.asmx

Site Service Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Sites.asmx

Users and Groups Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/UserGroup.asmx

Versions Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Versions.asmx

Views Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Views.asmx

Webs Web Service

Namespace: Microsoft.SharePoint.SoapServer

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services Web Service (in STSSOAP.dll)

Web Reference: https://Server_Name/[sites/][Site_Name/]_vti_bin/Webs.asmx

Query Web Service

Namespace: Microsoft.SharePoint.Portal.Search.WebQueryService

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Web Reference: https://server_name/_vti_bin/search.asmx

Area Web Service

Namespace: Microsoft.SharePoint.Portal

Platforms: Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Web Reference: https://server_name/_vti_bin/areaservice.asmx

Security: Code Access Security

Comments