Unable to retrieve files from a SharePoint library with spaces in it via SSRS and an XML Datasource
I'm trying to retrieve files from sharepoint via SSRS and an XML Datasource.
This is what I'm currently using:
<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>
I can retrieve all of the files from the testfolder located under account (that's good!) however. If I create a query like this:
<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>
<开发者_Go百科/Parameter>
</Parameters>
</Method>
</Query>
The second that I add the space in the library name (Invoice City) it just returned everything in the Invoice City library (folders and files).
I would just make the folder name without spaces but I'm using CRM Documents and it auto creates folders as the entity name (Invoice City).
I've tried putting the folder name in quotes, and a billion other tries of escape characters and other things. I would expect this to work as the web service is just expecting a string.
Has anyone else ran into this issue? Help is greatly appreciated.
Figured out the problem! It didn't have anything to do with spaces in the end (though I thought it might have been).
I was using the library name instead of the path name.. So for the fix:
<Parameter Name="queryOptions" Type="xml">
<DefaultValue>
<QueryOptions>
<Folder>**new_invoicecity**/testfolder</Folder>
</QueryOptions>
</DefaultValue>
</Parameter>
精彩评论