
以下soap调用不会从列表子文件夹返回文件.它返回folder1,folder2和file1.pdf
Shared documents folder1 file2.docx file3.pdf folder2 sub-folder1 file5.pdf file4.pdf file1.pdf
SOAP调用
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>
关于如何从文件夹1,文件夹3和子文件夹1中获取文件的任何线索包含在结果中?
如果列出Web服务无法做到,是否有替代服务/方法?
附加信息:
还有另一个Web服务SiteData(_vti_bin / sitedata.asmx).它有一个类似的方法(getListItems),并返回所有的文件只有列表名称,没有其他参数.问题是我无法弄清楚如何/在哪里指定Paging参数,因为没有queryOptions输入元素像列表网络服务.
<soap1:strListname>?</soap1:strListname> <soap1:strquery>?</soap1:strquery> <soap1:strVIEwFIElds>?</soap1:strVIEwFIElds> <soap1:uRowlimit>?</soap1:uRowlimit>解决方法 使用< VIEwAttributes Scope =“RecursiveAll”/>可以递归地获得列表内容. elment.
我的肥皂包里有一个愚蠢的错误. queryOptions元素没有命名空间.我在下面的文本中修正了.
<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:**queryOptions> <queryOptions> <IncludeMandatoryColumns>TRUE</IncludeMandatoryColumns> <VIEwAttributes Scope="RecursiveAll"/> <DateInUtc>TRUE</DateInUtc> </queryOptions> </**soap1:**queryOptions> </soap1:GetListItems> </soap:Body></soap:Envelope>
Btw,有一个很棒的工具,U2U CAML Builder构建SharePoint CAML.我希望我在几周前才发现.
总结以上是内存溢出为你收集整理的Web服务 – SharePoint List.getListItems WebService以递归方式返回子文件夹内容全部内容,希望文章能够帮你解决Web服务 – SharePoint List.getListItems WebService以递归方式返回子文件夹内容所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)