
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2020 07:03 AM
Hi,
Is there a way to send an XML payload (Content-type: application/xml or text/xml) without escaping? I know you can do this by replacing variables with command setStringVariableNoEscape, if you call a REST Message module. But I need to send scripted REST message, and I'm using command "setRequestBody(myXML_AsAString)".
If I'm sending this to ServiceNow Scripted REST API endpoint, I get an error "Not valid XML Payload" (http_status : 500) as a response.
Does anyone have any idea?
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2020 07:48 AM
Hi ,
You can use something like this
unescapeForXMLText(str)
For more information refer the below link:
https://old.wiki/index.php/XMLUtilJS#unescapeForXMLText.28str.29
Mark my ANSWER as CORRECT and hELPFUL if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2020 07:48 AM
Hi ,
You can use something like this
unescapeForXMLText(str)
For more information refer the below link:
https://old.wiki/index.php/XMLUtilJS#unescapeForXMLText.28str.29
Mark my ANSWER as CORRECT and hELPFUL if it works.