You can access the SPPT Lists.asmx Web Service remotely just like any other Web
Service. In VS.NET you can simply add a Web Reference and then use the proxy
stub that VS.NET generates to access the WebMethods in the same way that you
access public methods of any object. Here are the steps and some code:
1. Right click on References in the Solution Explorer and choose "Add Web
Reference" from the resulting context menu
2. Type in the URL to the Web Service WSDL (Web Service Definition Language).
For WSS you would use: http://[topSite]/_vti_bin/Lists.asmx?WSDL
or: http://[topSite]/[childSite]/_vti_bin/Lists.asmx?WSDL
For SPS you would use: http://[portal]/_vti_bin/Lists.asmx?WSDL
or: http://[portal]/[area]/Lists.asmx?WSDL
or: http://[portal]/[Cn]/[area]/Lists.asmx?WSDL
or:
http://[portal]/sites/[topSite]/_vti_bin/Lists.asmx?WSDL
or:
http://[portal]/sites/[topSite]/[childSite]/_vti_bin/Lists.asmx?WSDL
_vti_bin is a virtual directory on any SPPT site that holds all Web Services.
Fun fact, vti stands for Vermeer Technologies Incorporated, the creators of
FrontPage that Microsoft acquired.
3. Press Enter to locate the Web Service
4. Revise the Web reference name (if you want) and click the Add Reference
button.
5. Consume the Web Service. Some VB.NET code follows for a Web reference to
wss01
'VB.NET
'Create a local variable
Dim lists As wss01.Lists = New wss01.Lists
'Give it the current security context
lists.Credentials = System.Net.CredentialCache.DefaultCredentials
'Retrieve ListItems from the task list into an XML Node
Dim items As System.Xml.XmlNode = lists.GetListItems("Tasks", Nothing,
Nothing, Nothing, Nothing, Nothing)
'Output the number of child nodes returned
Response.Write("XML Child Nodes: " + items.ChildNodes.Count.ToString() +
"
")
//Retrieve an XML node containing all the ListItems in the Tasks list (you
could use the list GUID if you prefer):
//This is an untested solution.
System.Xml.XmlNode items = lists.GetListItems("Tasks");
Lists.asmx has the following public WebMethods:
AddAttachment
Adds an attachment to the specified list item in the specified list.
AddList
Creates a list in the current site based on the specified name, description,
and list template ID.
DeleteAttachment
Removes the attachment from the specified list item.
DeleteList
Deletes the specified list.
GetAttachmentCollection
Returns a list of the URLs for attachments to the specified item.
GetList
Returns a schema for the specified list.
GetListAndView
Returns the list and view schemas for the specified list.
GetListCollection
Returns the names and GUIDs for all the lists in the site.
GetListItemChanges
Returns changes made to the list since the specified date and time.
GetListItems
Returns information about items in the list based on the specified query.
UpdateList
Updates a list based on the specified field definitions and list properties.
UpdateListItems
Updates the specified items in a list on the current site.
You can find additional information (although not much) here:
msdn.microsoft.com/.../...ListItems_SV01034381.asp