Web Service

Web Service

SharePoint 2007

Specifies server-side code that exposes code routines to call from remote systems.

Real World Example

A developer has created a Web Part that requires the capability to populate a list box with items from a remote system without committing a postback event to the server running Microsoft Office SharePoint Server 2007 or Windows SharePoint Services 3.0; for example, client-side ECMAscript (JScript, JavaScript code) that calls the Web service.

Technical Details

Web services enable Web Parts to provide a rich client experience and can also enable methods for querying and updating data in SharePoint Products and Technologies or other systems.

You usually implement Web services through files with the .asmx file name extension. A Web service in the Microsoft .NET Framework is provided by associating a [WebMethod] tag with a routine in server-side code. This allows the routine to be called through a Web service request made to the ASMX page.

Support Details

A common request in a Web service is to provide the capability for client-side controls (for example, AJAX controls) to get or post data without committing postback events. If client-side code might require access to server data that is not in the SharePoint environment, the client-side code would either have to make a cross-domain call, which might not be allowed at the client, or it would have to create a proxy for the request through the Office SharePoint Server 2007 or Windows SharePoint Services 3.0 server. This would require the installation of Web services that expose Web methods that then call the back-end server’s Web services so that the client has to make calls only in the same domain (for example, by using the same base URL as the SharePoint site). This causes extra traffic to Office SharePoint Server 2007 or Windows SharePoint Services 3.0, which in turn causes new outbound traffic to a back-end server, possibly negatively affecting the memory or thread use on the SharePoint front-end Web server.

The default SharePoint Web services are installed in the server global _vti_bin directory because they are intended for environment-wide use. However, there is no other directory provided for Web services to be deployed in the same way that Web Parts can be deployed (in other words, both globally and non-globally and with site context). This causes confusion as to where to install Web services and which URL to reference. A second Web service location that is exposed within the Central Administration Web site, _vti_adm, is available; however, services hosted in this area are available only to server farm administrators.

Community Additions

© 2016 Microsoft