IPhone: Sharepoint method GetListItemChangesSinceToken returns an element recursively

I am integrating sharepoint web services with my iPhone application. Done with the integration of the GetListCollection and GetListItems . Having tried the GetListItemChangesSinceToken service for synchronization, instead of using the GetListItems service, I get all the elements of the document library in the response, which means that it pulls all the elements recursively from this doc library, whereas I only need the elements related to this library (and not the subfolder elements )

This is my folder hierarchy.

Testing → Testing 1 (SF), Testing doc1 (D), Testing doc2 (D) → Testing 2 (SF), Testing 1 doc1 (D)

SF - SubFolder; D - Document

We use the following message:

 NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"utf-8\"?> <soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema- instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> <soap:Body> <GetListItemChangesSinceToken xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"> <listName>%@</listName> <queryOptions><QueryOptions> <IncludeMandatoryColumns>TRUE</IncludeMandatoryColumns> <DateInUtc>TRUE</DateInUtc> <Folder>%@</Folder></QueryOptions> </queryOptions> </GetListItemChangesSinceToken> </soap:Body></soap:Envelope>",listName,pathRef]; 

The parameters that I pass in order to get the elements of the first level folder (Testing), listName : Testing pathRef : Testing

This query returns all the items in the Test folder (test 1 (SF), test doc1 (D), test doc2 (D), test 2 (SF), test 1 doc1 (D)), while I only need the elements (Test 1 (SF), Testing doc1 (D), Testing doc2 (D)).

+4
source share
1 answer

Take a look at the MSDN article on this http://msdn.microsoft.com/en-us/library/lists.lists.getlistitemchangessincetoken(v = office.12) .aspx , specifically the section on requests and folder.

You just want to add the folder option for the Root folder, this is the relative path to the server according to this blog post: http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2008/01/21/synchronizing-with-windows -sharepoint-services-part-1.aspx

So try

 <folder>site/list/</folder> 
+1
source

All Articles