AnsweredAssumed Answered

Nintex Workflow Web Request failing with '&' characters in xml

Question asked by cx12189 on Jan 20, 2016
Latest reply on Mar 10, 2016 by cju@evolusys.ch

I have this WebRequest xml. Everything is correct, and it works for our company 99% of the time. I only just discovered this today. When we run UpdateListItems the workflow erros with a soap exception. Tracking what causes it the 1 percent of the time it was the character '&'.

1. We cannot prevent all our users from inputting an & in EVERY text field.

2. We cannot put regex expressions before EVERY UpdateListItems WebRequest for every variable,(replacing '&' with 'And') we think that is too much overhead, and some of these updatelistitems use 10-15 Fields to update.

3. Additionally, overhead for converting the '&' to the html entity is also too much overhead

4. We will not use the Nintex OOB 'WebService', it has too many of it's own problems.

 

<?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>

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

<listName>Sections Management</listName>

<updates>

<Batch OnError="Continue" ListVersion="1" ViewName="">

<Method ID="1" Cmd="New">

<Field Name="ID">New</Field>

<Field Name="Title">{WorkflowVariable:foreach_Section}</Field>

<Field Name="SubSection">{WorkflowVariable:foreach_SubSection</Field>

</Method>

</Batch>

</updates>

</UpdateListItems>

</soap:Body>

</soap:Envelope>

 

So some obvious questions are...

1. Are their other processes that would work? We would prefer something soap related. The nintex oob have come with migration issues, don't work across farms / site collections(maybe)/ and don't meet various standards for easy implementations.

2. Is there a way we can make nintex send the literal values? or prevent either API's from evaluating the '&'?

 

The Soap Exception:

Error performing web request.

<soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>

Outcomes