Skip to main content
Nintex Community Menu Bar

Web request response stored as JSON instead of XML

  • April 8, 2016
  • 2 replies
  • 116 views

Forum|alt.badge.img+6

Hello,

I'm using Nintex Workflow for Sharepoint 2013, and I have a WebAPI service that returns XML values.

I call this service via the Nintex workflow's Web Request and store the variable in a text field, but when I print it in the log I see that it is stored as JSON (instead of the expected XML), and therefore I cannot parse it using XPATH!

Is there a way I can modify the behavior of the Web Request, to return XML instead of JSON?

2 replies

Forum|alt.badge.img+16
  • April 9, 2016

Have you tested it with the Run Now button?


Forum|alt.badge.img+6
  • Author
  • April 11, 2016

Hey Fernando,

Thanks for the reply, I was able to solve the problem by adding an Accept Header with the value 'application/xml'.

The problem now is that I'm trying to retrieve an XML value stored WITHIN the returned XML, but all special characters are automatically encoded, i.e. the '<' is encoded to &lt; and the '>' is encoded to &gt;

I was able to by-pass this by adding 2 regex actions within the workflow, but I'm curious if there's a way to PREVENT this automatic encoding... do you have any ideas?