This List.getListItems(String, String, Query, ViewFields, String, QueryOptions, String) webservice ( when called from Java) returns sub folders as single nodes. Is there a way to recursively get all sub folder contents?
I have tried <ViewAttributes Scope='RecursiveAll' />
under QueryOptions with no luck.
First I tried with the following
POST /_vti_bin/lists.asmx HTTP/1.1 Accept-Encoding: gzip,deflate
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://schemas.microsoft.com/sharepoint/soap/">
<soap:Header/>
<soap:Body>
<soap1:GetListItems>
<soap1:listName>Shared Documents</soap1:listName>
<queryOptions>
<QueryOptions>
<IncludeMandatoryColumns>TRUE</IncludeMandatoryColumns>
<ViewAttributes Scope="RecursiveAll"/>
<DateInUtc>TRUE</DateInUtc>
</QueryOptions>
</queryOptions>
</soap1:GetListItems>
</soap:Body>
</soap:Envelope>
This is running against SharePoint 2010.
Second trial#. Returns only the one level of folders.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://schemas.microsoft.com/sharepoint/soap/">
<soap:Header/>
<soap:Body>
<soap1:GetListItems>
<soap1:listName>Shared Documents</soap1:listName>
<soap1:query>
<Query>
<Where>
<Eq>
<FieldRef Name='FSObjType' />
<Value Type='Lookup'>1</Value>
</Eq>
</Where>
</Query>
</soap1:query>
<queryOptions>
<ViewAttributes Scope="RecursiveAll"/>
<QueryOptions>
<IncludeMandatoryColumns>TRUE</IncludeMandatoryColumns>
<ViewAttributes Scope="RecursiveAll"/>
<DateInUtc>TRUE</DateInUtc>
</QueryOptions>
</queryOptions>
</soap1:GetListItems>
</soap:Body>
</soap:Envelope>