I'm writing a C# program which needs to get a list of documents in a specific document library on a SharePoint site. It was previously written to use the DWS web service, calling DWS.GetDwsMetaData and querying into the XML returned. The problem was that this method returns a TooManyItems error in the XML if there are more than 99 elements of the list, and I need to rewrite the program to get around this glitch.
I think the best solution is to use the Lists web service instead. I want to call Lists.GetListItems and have it return exactly the same XML format that the DWS.GetDwsMetaData returned. I'm a complete noob at this, and I'm looking for some help writing the query I'll need to feed into the method call.
Here's the documentation on the method:
http://msdn.microsoft.com/en-u...ists.getlistitems.aspx
Specific questions:
1. How do I create the query element I'm supposed to pass into the method, and what query would I use to get all the contents of a list? (Like a Select * from Documents.)
2. If I set rowLimit to a value greater than 99, will that solve my TooManyItems problem?
3. What exactly is a view, or should I just ignore it since it's an optional parameter?
4. How can I find the GUID for a list, given the URL to the SharePoint, URL to the document library within the SharePoint, and knowing that the list's name="Documents"?
Sorry if this is a really loaded question. Any help would be appreciated.
- Jen
I think the best solution is to use the Lists web service instead. I want to call Lists.GetListItems and have it return exactly the same XML format that the DWS.GetDwsMetaData returned. I'm a complete noob at this, and I'm looking for some help writing the query I'll need to feed into the method call.
Here's the documentation on the method:
http://msdn.microsoft.com/en-u...ists.getlistitems.aspx
Specific questions:
1. How do I create the query element I'm supposed to pass into the method, and what query would I use to get all the contents of a list? (Like a Select * from Documents.)
2. If I set rowLimit to a value greater than 99, will that solve my TooManyItems problem?
3. What exactly is a view, or should I just ignore it since it's an optional parameter?
4. How can I find the GUID for a list, given the URL to the SharePoint, URL to the document library within the SharePoint, and knowing that the list's name="Documents"?
Sorry if this is a really loaded question. Any help would be appreciated.
- Jen