- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 01:48 AM
Hi Friends,
I have done remedy to ServiceNow integration using soap web service, Having problem to parse XML response and setting the incident number to ServiceNow custom field named remedy incident number.
soap xml response
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns0:HelpDesk_Submit_ServiceResponse
xmlns:ns0="urn:COL_HPD_IncidentInterface_Create_WS"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns0:Incident_Number>INC000000121114</ns0:Incident_Number>
</ns0:HelpDesk_Submit_ServiceResponse>
</soapenv:Body>
</soapenv:Envelope>
Tried XML parsing in the Business rule but no luck
var xmlDoc = new XMLDocument();
xmlDoc.parseXML(responseBody);
var correlationID = xmldoc.getNodeText("//ns0:Incident_Number");
Solved! Go to Solution.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 02:13 AM
Hi,
Can you try the given script in your business rule.
var response = s.execute();
var ResponseBody = response.getBody();
var status = response.getStatusCode();
var xmlDoc = new XMLDocument2();
xmlDoc.parseXML(ResponseBody);
var correlationID = xmlDoc.getNodeText("//ns0:Incident_Number");
gs.log(correlationID);
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 05:07 AM
were you able to copy the value to the custom field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2019 10:27 PM
Thank you Bhawana this code saved my time and solved my issue 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 04:48 AM
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 12:05 PM - edited 11-22-2023 12:06 PM
Thank you Bhawana!!
It worked for me!
I used in my custom action in my Flow Designer.
Obrigado!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 04:55 AM
HI RJ,
I am also having the challenge.now you are able to parse the xml responses and map the fields?
Regards,
Sunita