cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Call Web Service - The remote server returned an error: (500) Internal Server Error.

Hi All,

We have a requirement to create an Item in a list via the workflow. this works fine, if both the lists are in the same Site Collection. In this scenario, we have 2 Site collections and when a workflow is run on an Item in a list which exists in Site A, we need to create an Item in another list which exists under Site B.

I am trying to use the 'Call Web Service' Action and using the 'UpdateListItems' Method to add a new Item. The XML I use is as below and have tried with many variants as seen on Nintex Connect and other sites.

<Batch OnError="Continue" ListVersion="1">
   <Method ID="1" Cmd="New">
      <Field Name='ID'>New</Field>
      <Field Name="Title">This is a new Title</Field>
   </Method>
</Batch>

But no matter what I pass through, I get the below error

The remote server returned an error: (500) Internal Server Error.

I have seen suggestions to 'Encode Inserted Tokens' but still no luck. Anyone else faced similar issues. Is it possible at all to create an Item in a list in a separate site collection to where the workflow is running ? Any leads on what could possibly be the issue ?

Thanks in advance.

Shaju Samuel

Labels: (2)
Reply
13 Replies
Highlighted
Automation Master
Automation Master

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Are you seeing this error only in the "Run Now" test result view mode?    This is pretty common.   If your answer is yes, try running your workflow to see if the results are what you were expecting.


Thanks

Reply
Highlighted
Nintex Newbie

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Thanks Mark.
Yes that is when I click on 'Run Now' but even if I run the workflow, I get the below 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.

Reply
Highlighted
Automation Master
Automation Master

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

In the Soap Editor copy and paste the following, make sure to change listName to your list name where i have "Your List Name":

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">
<soap:Header>
</soap:Header>
<soap:Body>
<m:UpdateListItems>
<m:listName>Your List Name</m:listName>
<m:updates>
<Batch OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name="ID">New</Field>
<Field Name="Title">Test One</Field>
</Method>
</Batch>
</m:updates>
</m:UpdateListItems>
</soap:Body>
</soap:Envelope>

Reply
Highlighted
Nintex Newbie

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Thanks again Mike

Still gives the same error. Tried both options, 'Run Now' and running the workflow.

Reply
Highlighted
Nintex Newbie

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Are you seeing any errors in the ULS logs?

Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Hello Shaju Samuel‌ - 

A few things to try.

Does the login that is executing the web service have access to the list that is being written to? If not, you will be able "Test the connection" just fine, but will not be able to Run Now.

Also, check the spelling on the list name, could be something as simple as a typo .

Hope this helps!

Reply
Highlighted
Automation Master
Automation Master

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Can you take a screen shot of the action showing the Soap Editor along with the soap above?     This will  help to narrow it down a bit.

Thanks

Reply
Highlighted
Nintex Newbie

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Thanks Jan

I don't see anything specific in the ULS logs in regards to the error.

Reply
Highlighted
Nintex Newbie

Re: Call Web Service - The remote server returned an error: (500) Internal Server Error.

Hi Jesse

Thanks.

Yes the user have access to the list and I have made sure that the Spellings and names are all correct.

Reply