GetListItems fails

  • 30 December 2015
  • 4 replies
  • 10 views

Badge +1

Hi

 

I am trying to query my list but I keep getting this error:

 

Failed to invoke web service. Error returned from server: <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

 

Here is my xml:

 

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">

<listName>{Common:ListName}</listName>

<viewName></viewName>

<query>

<Query>

<Where>

<Eq>

          <FieldRef Name="ID" />

          <Value Type="Text">{WorkflowVariable:str_ID}</Value>

</Eq>

</Where>

</Query>

</query>

<viewFields><FieldRef Name="AdditionalSiteAccess" /></viewFields>

<rowLimit></rowLimit>

<queryOptions xmlns:SOAPSDK9=

"http://schemas.microsoft.com/sharepoint/soap/" >

<QueryOptions/>

</queryOptions>

<webID></webID>

</GetListItems>

</soap:Body>

</soap:Envelope>

 

 

Cheers

 

 

Marko


4 replies

Userlevel 6
Badge +16

Try to get more details from Sharepoint log files

Badge +5

Marko,

It may be a simple formatting issue. One trick I use to eliminate this is to go to the target list on its native site collection and open a new workflow editor. Create a query action on this list with the same variables you'd use in your other workflow - using the standard query builder GUI. Save that action and edit it again, this time switching to the CAML Editor. The resulting Query can be copied and pasted into your other workflow query. All you need to provide is the site URL for the alternate site, and be sure the variable references are the same.

Hope this helps,

Gerard

Badge +2

Hi Marko,

a few things that you could check:

  • try removing the namespace settings of your queryoptions
  • check the workflow variable with the ID, is the value set at the time the web service is called?
  • Have you tried the Run now option of the web service action? You can try running the web service call with a fixed ID and test it this way

Hope this helps,

Martin

Userlevel 4
Badge +11

Hi, in the code you have posted, there are two <Query> tag, I think that there should be only one

Giacomo

Reply