1

So after searching over and over on the net for a reason for my problem. I decided to post it here.

I'm trying to get all the items in my list that are in a subsite. In that subsite there are 3 other lists that I can access without a problem. The only difference between this list and the 3 others is that it has metadata activated.

I'm always getting this :

Exception lors de l'appel de « GetListItems » avec « 7 » argument(s) : « Exception of type 'Microsoft.SharePoin t.SoapServer.SoapServerException' was thrown. »

Here is the code :

#Create XML to query Sharepoint web service. To get list of items (files & folders)
$xmlDoc = new-object System.Xml.XmlDocument
$query = $xmlDoc.CreateElement("Query")
$viewFields = $xmlDoc.CreateElement("ViewFields")
$queryOptions = $xmlDoc.CreateElement("QueryOptions")
$queryOptions.InnerXml = "<ViewAttributes Scope='RecursiveAll' IncludeMandatoryColumns='FALSE' />"
$rowLimit = "10000"

#Sharepoint info and paths
$ServicePath="https://mysite/telecom/Tests/_vti_bin/lists.asmx?WSDL"
#base du site sharepoint
$listName = "{40B1A13A-2126-4AD5-8FA6-57317E7FFB5E}" #Listitem name to download
$DestinationPath="C:\Temp\TEST\" #Path of Destination share

#Get service and items
$service = New-WebServiceProxy -UseDefaultCredential -uri $ServicePath
$list = $service.GetListItems($listName, "", $query, $viewFields, $rowLimit, $queryOptions, "")

I've tried the list name, GUID. With view name, with view GUID.

I've tried to change the queryoptions too.

I've tested most of the different kind of libraries and this is the only one that doesn't work.

I've tried another list in another subsite with metadata and doesn't work as well.

If you need more info, please ask.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.