Web服务 – SharePoint List.getListItems WebService以递归方式
发布时间:2020-12-14 18:50:15 所属栏目:资源 来源:网络整理
导读:我从 CXF调用lists.asmx webservice. 以下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 H
我从
CXF调用lists.asmx webservice.
以下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中获取文件的任何线索包含在结果中? 附加信息: <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.我希望我在几周前才发现. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |