Elczar Adame's Shared Points on SharePoint

WSS 3.0 Lists Web Service


 

The Windows SharePoint Services Web services provided by the Microsoft.SharePoint.SoapServer namespace includes methods that provide Microsoft .NET Framework developers with object models for creating solutions that work with Windows SharePoint Services remotely from a client or custom application. They 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 are provided through the /_vti_bin virtual directory, which maps to the \\Program Files\Common Files\Microsoft Shared\web Server extensions\12\ISAPI physical directory. The Administration Web service is provided through the /_vti_adm virtual directory, which maps to \\Program Files\Common Files\Microsoft Shared\web Server extensions\12\ ADMISAPI physical directory.

The following table lists the available Web services:

 

Administration Service (admin.asmx)

Permissions Service (permissions.asmx)

Alerts Service (alerts.asmx)

Site Data Service (sitedata.asmx)

Copy Service (copy.asmx)

Site Service (sites.asmx)

Document Workspace Service (dws.asmx)

Search Service (spsearch.asmx)

Forms Service (forms.asmx)

Users and Groups Services (usergroup.asmx)

Imaging Service (imaging.asmx)

Versions Service (versions.asmx)

List Data Retrieval Service (dspsts.asmx)

Views Service (views.asmx)

Lists Service (lists.asmx)

Web Part Pages Service (webpartpages.asmx)

Meetings Service (meetings.asmx)

Webs Service (webs.asmx)

People Service (People.asmx)

 

As titled, this piece will focus on WSS 3.0 Lists Service. The following table lists the Web methods provided by the service to interact with our SharePoint list libraries:

 

AddAttachment

GetListAndView

AddDiscussionBoardItem

GetListCollection

AddList

GetListContentType

AddListFromFeature

GetListContentTypes

ApplyContentTypeToList

GetListItemChanges

CheckInFile

GetListItemChangesSinceToken

CheckOutFile

GetListItems

CreateContentType

GetVersionCollection

DeleteAttachment

UndoCheckOut

DeleteContentType

UpdateContentType

DeleteContentTypeXmlDocument

UpdateContentTypeXmlDocument

DeleteList

UpdateContentTypesXmlDocument

GetAttachmentCollection

UpdateList

GetList

UpdateListItems

Now let us start with the walkthrough.

1. Create a SharePoint Web application.

2. Create an ASP.NET Web application and add a Web reference addressed to http://<SharePoint Web application URL>/_vti_bin/Lists.asmx. For demonstration purposes, let us name our Web reference as Proxy.

3. Write the following lines of code to an appropriate event:

Proxy.Lists proxy = new Proxy.Lists();

proxy.Credentials = CredentialCache.DefaultCredentials;

XmlNode xmlnode = proxy.GetListItems("Shared Documents", null, null, null, null, null, null);

XmlNodeReader xmlnodereader = new XmlNodeReader(xmlnode);

DataSet dataset = new DataSet();

dataset.ReadXml(xmlnodereader);

xmlnodereader.Close();

gvwList.DataSource = dataset.Tables[1];

gvwList.DataBind();

Thanks…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: