[SP2010] Web Services Changes

Rate this item
(0 votes)

SharePoint 2007 Web Services model provided limited functionality to manage SharePoint farm over the web model. The reason of this is that SharePoint 2007 was considered as a stand-alone product, without Web 2.0 features and Cloud services.
In nowadays, we are moving to Online services and rich Web Services model is one of the requirements for all products we are using, especially for enterprise wide applications that can be scaled globally.
The release of SharePoint 2010 takes into account Web 2.0 and Cloud trend and exposes all new functionality that is exposed not only via SharePoint API, but via Web Services, WCF model and JSON protocol.
Microsoft direction is to provide you rich web API to expose all stand-alone power of SharePoint over the wire.

SharePoint 2010 Web Services were refactored completely to incorporate all power and flexibility of WCF 4.0 technology. New functionality is provided via Web Service mode, as WCF services and supports JSON protocol for Web 2.0 integration

Overview

In this document we will review the changes in Web Services model that SharePoint 2010 provides us.

All services are exposed over the same URL patterns:
- Administrative services:  http://<site>:<port>/_vti_adm/Admin.asmx
- Site services: http://<site>:<port>/<subsite>/_vti_bin/<web_service>.asmx

Howerver, all new MSS2010 functionality (services) are exposed over additional Web Services, that have new URLS like: http://<site>:<port>/<serviceName>/Admin.asmx

Sample scenario

To demonstrate the changes in SharePoint 2010 Web Services we created fictional scenario that highlight the changes in Web Services and what became available with the new functionality.
The “Linen Clothes” company is an Australian state-wide brand that sells men and women clothes. They also run online shop on the top of SharePoint Online services. All their stock items are managed via SharePoint Sites, grouped by style and stored in different sub-sites. For example, the “Men Clothes” section has 5 sub-sites – each for the weather season and special clothes. The total number of all sites on their portal is 13 – three root sites and 10 sub-sites.
Management of “Linen Clothes” decided to expand their business to interstate-wide model, and wants to extend the shop with the new styles and brans. They decided that they will start selling child and bed clothes. Moreover, each shop should has an ability to sell specific items only, not available in others shops, providing specific customization of the home pages. For example, some states can sell scarf stuff, but others only thongs instead.
Keeping this in mind, IT department of the company expects the number of SharePoint sub-sites to be increased in 3 times, and what’s worse each shop should have an ability to create its own sites dynamically. It was not a problem for one shop, when IT guys can logon to the SharePoint remotely and create all sites manually. But maintaining 40 sites plus creating and removing them time to time might be a daunting task.  So, IT department needs a good solution how to automate this task and provide tools to manage the sites by shops themselves.
Luckily, the smart decision of IT to choose the Microsoft SharePoint 2010 platform for their business will help them to implement all new requirements. SharePoint 2010 Web Services provide rich API to manage SharePoint sites and content.
With the new API IT can provide the scrips to shops to manage their sites. For example, the scrips that Melbourne shop received from IT departments allows them to create and delete SharePoint Workspace for their scarf models, add WIKI page with the photo and description of each scarf style. Moreover, IT can easily distribute sites, for example to export a site and deploy it to the Tasmania branch.

New Web Services

This section describes the new Web Services that was added to MSS2010. Use the following URL to access them: http://<site>:<port>/_vti_adm/<web_sevice>.asmx

Service name

Description

Diagnostics

Allows you to send the client’s reports

OrganizationProfileService

Manage the Orgranization Profiles

ProfileImportExportService

Profile replication over the Web Services

PublishService

Office Business Application Client Extensions Publish Web Service

SharedAccess

Checks if access is client only

SocialDataService

Managing social features as comments, tags, bookmarks, and ratings

TaxonomyClientService

Service designed for Office client applications to manage the taxonomy terms

 

New JSON services

Service name

Description

AsynchronousWebPartService

<TBD>

DynamicGridContent

<TBD>

EwaInternalWebService

<TBD>

SilverlightProfileService

<TBD>

SocialDataInternalService

<TBD>

TaxonomyInternalService

<TBD>

 

WCF Services (.svc)

Service name


BdcAdminService


BdcRemoteExecutionService


BDCResolverPickerService


CellStorage.https


CellStorage


Client.https

Client

ListData

SPClaimProviderWebService

 

Changes in existing Web Services

There are few services that were updated to provide additional method.
Lists
The list services provides functionality to work with the List libraries

Service method

Description

AddSyncAttributionFields

Add 2 hyperlink columns to track library synchronization

AddWikiPage

Creates new wiki page with the custom content and add to the existing Wiki Library

GetListContentTypesAndProperties


GetListItemChangesWithKnowledge

Returns changes made to the list since the specified date and time. In this extended version you can set the query for extracting data

UpdateListItemsWithKnowledge


After we created the site we are going to add couple of WiKi pages which out items, using AddWikiPage method. This method accepts the name of existing list and the html string of the wiki page content.
After we created the WikiPage we want to have this list to be synchronized with Offline clients, like Workspace 2010

Sites

Service method

Description

CreateWeb

Create new SharePoint Site (sub-site for SC)

DeleteWeb

Delete site directly beneath the current one

ExportSolution

Export solution schema without data (ImportSolution existed in WSS 3.0)

ExportWorkflowTemplate


GetSite

Returns ID for the Web Application

GetUpdatedFormDigestInformation

Returns Value and Timeout of FormDigestInformation class

The "Sites” Web Service provides new methods to manage SharePoint sites (workspaces). Previously, in SharePoint 2007 you can't create workspaces for the root site via Web Services. But now, SharePoint 2010 extends Web Service model and provides methods to manage Workspaces.
With the new method you can get the Web Application ID, create SharePoint Workspace, export site schema as deployable cab file and delete the Workspace, for example use the following snippet to create new “ws2010changes” Team Site beneath the current site with the anonymous access.

siteService.CreateWeb("ws2010changes", "WS2010Changes", "MSS2010 Web Services changes samples", "STS#0", 1033, true, true, true);

CreateWeb method has the following signature (from autogenerated WS classes)

object[] results = this.Invoke("CreateWeb", new object[] {

url,

title,

description,

templateName,

language,

uniquePermissions,

anonymous,

presence});

Site Data

Service method

Description

GetChangesEx


Webs

Service method

Description

GetObjectIdFromUrl

Returns List Id from URL

Form Services

Service method

Description

GetListFormLocation


GetLocationForListForm


GetUserCodeDeploymentDependencies


SetFormsForListItem


SetSchemaChangesForList


Excel Services

Service method

Description

GetChartImageUrl

Returns the chart image

GetPublishedItemNames


GetSheetNames

Returns the name of Excel sheet

NewWorkbook

Creates new workbook

OpenWorkbookForEditing

[Office 2010] Edit workbook

SaveWorkbook

Saves workbook

SaveWorkbookCopy

Saves workbook copy

SetCalculationOptions


SetParameters


Official File

Service method

Description

GetFinalRoutingDestinationFolderUrl


GetHoldsInfo


Search

Service method

Description

GetQuerySuggestions


GetHoldsInfo


User Profile Services

Service method

Description

AddSuggestions


GetProfileSchema

GetProfileSchemaNames

GetUserOrganizations

GetUserPropertyByAccountName

Web Part Pages

Service method

Description

GetExpandedListViewXml


 

This is incompleted article, and work in the progress to update it with additional details

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.