Geeks With Blogs
Mike Huguet I'm just talking out loud

It has been a long time coming and I was finally able to find a diamond in the rough by locating a wrapper for the “challenging” yet powerful Lists.asmx service provided by WSS 3.0.  On my current project we had the need to interact with WSS to pull back some document templates that reside in a document library.  It only made sense for the implementation of this repository to use Lists.asmx or interact with a custom service that uses the SharePoint object model.  I figured by now someone had created a simplified way to interact with Lists.asmx without having to deal with all of the complexities of the XML.  After using multiple search engines, I found a comment in a Blog that subtly mentioned the solution.  Hidden away at the very end of an article on MSDN,, there is mention of SharePointUtility.dll.  This assembly includes the static wrapper class.  It is part of a great project on CodePlex that focuses on SSIS extensions,  A co-worker actually just used this today to move data from one column in a list to another and it worked like a charm.

The assembly can be downloaded as a separate download or you can get the source from the source control tab on While we are currently only using this for development, so far so good.   Here is a sample of its usage of getting data from a document library:

public List<ServicePaperworkTemplate> FindForServices(List<Service> services)
List<ServicePaperworkTemplate> results = null;
List<Dictionary<string, string>> resultFromSharePoint = null;
string queryString = default(string);
XElement query;

//These are the fields that we want in the result set.
string[] resultFields = new string[]

queryString = _buildCamlQueryForFilteringByServiceAbbreviation(services);
query = XElement.Parse(queryString);

//Query SharePoint for the list items based on the CAML query string.
resultFromSharePoint = ListServiceUtility.GetListItemData(SharePointSiteUrl, Lists.ServicePaperworkTemplates,
resultFields, query, true, 10) as List<Dictionary<string, string>>;

//Translate from the results to the list of business entities.
results = EntityFactory.Create(resultFromSharePoint, false) as List<ServicePaperworkTemplate>;

//Fill in the documents.

return results;

Technorati Tags: ,,
Posted on Thursday, September 10, 2009 11:00 PM | Back to top

Comments on this post: Wrapper for the SharePoint List Service

# re: Wrapper for the SharePoint List Service
Requesting Gravatar...
Very nice example!

Do you have a solution file that I could check?
Left by Microcontroleur on Oct 05, 2009 11:01 AM

Your comment:
 (will show your gravatar)

Copyright © Mike Huguet | Powered by: