Skip to main content
Nintex Community Menu Bar

Web Request- No Result in XML

  • September 17, 2018
  • 13 replies
  • 61 views

Forum|alt.badge.img+2

Hi!

I want to use the control web Request to get a xml result.

With the control in Forms i get the result in XML,

but i want to use the control in Workflow, too.

But there i get the result from the same site with the same x-api-token not in XML.

Seems to be JSON. Any idea what i can do?

Want to use in next step the XML-Request, but it doesn't work without XML ;-)

Regards
Detlef

13 replies

Forum|alt.badge.img+14
  • Scholar
  • September 18, 2018

can you post screenshot of your configuration?

have you configured respective header property so that web service return result as a XML?

btw, if you want to get a XML from a list field you do not need any webservice call. you can read out the XML content from list field (Item property)


Forum|alt.badge.img+2
  • Author
  • September 18, 2018

Hi Marian,

here are my screenshots.

The request is not for SharePoint. I read the data from a website outside our organisation.

it works in forms but not in workflow.

The header properties in Forms doesn't need a setting for XML.

In the header properties for Workflow, i tried al setting i know

- Accept and application/xml

-Content-Type and text/xml

nothing works in workflow webrequest

Thanks

This is from WebRequest in Forms:

The result:

And this from WebRequest in Nintex Workflow:

The result


Forum|alt.badge.img+14
  • Scholar
  • September 18, 2018

try to add custom header   Accept: application/xml


Forum|alt.badge.img+2
  • Author
  • September 18, 2018

this is what i tried a few times

it didn't work

this is why i'm wondering. In Forms it works with accept: application/xml by default


Forum|alt.badge.img+14
  • Scholar
  • September 18, 2018

and if you try to remove content-type and leave there just Accept?

or if you try to change content-type to application/xml as well?


Forum|alt.badge.img+2
  • Author
  • September 18, 2018

I did it both

Nothing works

Outlook für iOS<https://aka.ms/o0ukef> beziehen

Zum Datenschutz finden Sie hier<https://www.bernstein.eu/info/datenschutz/> unsere Datenschutzerklärung.


Forum|alt.badge.img+14
  • Scholar
  • September 21, 2018

does the service support to answer in XML at all?

I wonder whether web request control do not convert JSON in XML on its own to allow designers to address datasets with XPath.

unfortunately, I'm not able to proof check it on my own. could you maybe watch network traffic in developer console and find out what's exactly being returned for web request control?


Forum|alt.badge.img+2
  • Author
  • September 24, 2018

Here is the network traffic.

In Forms:

and in Workflow:


Forum|alt.badge.img+14
  • Scholar
  • September 25, 2018

could you check (and eventually post) Response body of single entries of form communication?

do they contain web request control's data in XML or JSON format?


Forum|alt.badge.img+2
  • Author
  • September 26, 2018

I don't know why, but now i got both results in JSON format.

Last week i got it in forms in XML back to use xpath.

I wrote a mail to the owner of the website, if they changed something.

The results in Forms and in Worlflow are the same now.

at the end of the output of workflow i got this:

Antwortheaders:
Access-Control-Allow-Credentials=true
Access-Control-Allow-Headers=Content-Type, Authorization, x-access-token, x-api-token, x-snapaddy-ms-token, x-snapaddy-ms-state, x-snapaddy-ms-user-id, x-snapaddy-token
Access-Control-Allow-Methods=GET, POST, PUT ,DELETE
Access-Control-Max-Age=86400
pragma=no-cache
Connection=Close
Content-Length=22690
Cache-Control=no-cache, no-store, must-revalidate
Content-Type=application/json; charset=utf-8
Date=Wed, 26 Sep 2018 12:16:10 GMT
Expires=0
ETag=W/"58a2-8mdbDo448dRUxKSeDvl4VrtpyEo"
Server=nginx/1.12.1
X-Powered-By=Express


Forum|alt.badge.img+2
  • Author
  • October 9, 2018

The owner of the site told me now, the output ist JSON

Is there a way to translate JSON to XML in Nintex?


Forum|alt.badge.img+14
  • Scholar
  • October 15, 2018

afaik, there is no OOTB JSON converter/parser in nintex.

there is an idea on uservoice -Server-Side JavaScript and JSON support – Customer Feedback for Nintex 

you may want to upvote it.

on following blog it has been explained how to develop it as a custom workflow action

Add a Function to Nintex Workflow 2013 as a Custom Workflow Action 


Forum|alt.badge.img+2
  • Author
  • October 15, 2018

Thanx for your help.
I will try to use the ideas from the blog