我正在尝试通过SSRS和XML数据源从sharepoint检索文件。
这就是我目前使用的:
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
<Parameters>
<Parameter Name="listName">
<DefaultValue>account</DefaultValue>
</Parameter>
<Parameter Name="queryOptions" Type="xml">
<DefaultValue>
<QueryOptions>
<Folder>account/testfolder</Folder>
</QueryOptions>
</DefaultValue>
</Parameter>
</Parameters>
</Method>
</Query>
然而,我可以从位于帐户下的测试文件夹中检索所有文件(这很好!)。如果我创建这样的查询:
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Invoice City</DefaultValue>
</Parameter>
<Parameter Name="queryOptions" Type="xml">
<DefaultValue>
<QueryOptions>
<Folder>Invoice City/testfolder</Folder>
</QueryOptions>
</DefaultValue>
</Parameter>
</Parameters>
</Method>
</Query>
第二个我在库名称(Invoice City)中添加了空格,它只返回了Invoice City库中的所有内容(文件夹和文件)。
我只是将文件夹名称设为空格,但我使用的是CRM Documents,它会自动创建文件夹作为实体名称(Invoice City)。
我已经尝试将文件夹名称放在引号中,并尝试将十亿个其他尝试转义字符和其他内容。我希望这可以工作,因为Web服务只是期待一个字符串。
还有其他人遇到过这个问题吗?非常感谢帮助。
答案 0 :(得分:1)
找出问题所在!它最终与空间没有任何关系(尽管我认为它可能已经存在)。
我使用的是库名而不是路径名。所以对于修复:
<Parameter Name="queryOptions" Type="xml">
<DefaultValue>
<QueryOptions>
<Folder>**new_invoicecity**/testfolder</Folder>
</QueryOptions>
</DefaultValue>
</Parameter>