Sidebar

Function to create XML message (application/json) from JSON data

0 votes
357 views
asked Oct 24, 2018 by (240 points)
Hi !

I need to send back to source using HTTP protocol data from destination, that provide me JSON data. Do you have QIE function to do it ?

1 Answer

0 votes
If I understand your request correctly you want to take the response from an HTTPS connection which is in JSON format and convert it to XML and then return the XML to the source.

On the source node set the response to "From Mapping or Destination Node"

On the Destination Node, check the Wait for ACK. The response from the HTTPS connection will be available in the response variable. You can try to use the "response = qie.convertFHIRJSONtoXML(response) function to convert your JSON to XML and then post the response (return response;).

If this does not work or if you would like to do more extensive changes to the XML response then it would be best to move the HTTPS post connection into a mapping node so you can process the XML more extensively and change the destination node to Discard.
answered Oct 24, 2018 by gary-t-8719 (14,860 points)
...