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

XML returned by 'Call web service' not parsed correctly

I have a web service that returns a response in the form

<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">


      <GetItemByIdResponse xmlns="">

         <GetItemByIdResult><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<Item xmlns:xsd="" xmlns:xsi="">





  <execution>SAMPLE EXECUTION TYPE</execution>


  <counterparty>Simon &amp; Simon</counterparty>






Notice that the GetItemByIdResult element contains a CDATA and, in this case, the counterparty element contains &amp;

Using the Nintex action 'Call web service' I store the result in a variable XmlResult, checking "Specify elements" and selecting the GetItemByIdResult node. With verbose enabled, I can see that XmlResult contains & not &amp; 

When I then use a Query XML action (source=XML and XML is {Workflow:Variable:XmlResult}), I get the bizarre result that any output gets set to the entire XmlResult. I have several outputs to extract the data, such as a XPath output with the xpath=/Item/counterparty.

For any item where the counterparty does NOT contain &amp; this does not happen; the Query XML action behaves normally.

So I think the 'Call web service' action does not properly encode the ampersand, and the Query XML action should just fail if it is seeing bad XML (?).

My workaround for this is to set XmlResult = fn-Replace(TradeResultXml,&,&ampSmiley Wink. Then it works fine.

I just thought I would throw this out there to see if you think it is a bug, or if I am missing something.



0 Kudos