- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 07:57 AM
I recently upgraded my instance to Istanbul. After doing that the sensor script I had in my SOAPMessage Activity suddenly stopped working. The error message I receive is org.mozilla.javascript.WrappedException:Wrapped ReferenceError "XMLDocument" is not defined.
The script is supposed to get the response from a SOAP API call and then parse it and display if it was successful or a failure and give the reason why it failed.
It seems like XMLDocument is no longer available for use in Istanbul? I am looking at the documentation for Istanbul though and it XMLDocument should work...
Here is the problem code:
var responseXML = new XMLDocument(activity.output, true);
gs.log(activity.output);
//get the login id for the user
var name = responseXML.getNodeText("//*[name()='ns:loginId']");
//determin if the request was successful or not
var status = responseXML.getNodeText("//*[name()='ns:responseStatus']");
//get the reason for failure or a message stating the request completed successfuly
var respMsg = responseXML.getNodeText("//*[name()='ns:responseMsg']");
.
.
.
Any idea what the issue is? This script worked fine in Fuji but that is not the case in Istanbul.
Thanks,
Devlin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 10:44 AM
hmmm
Is XMLDocument2(https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=c_XMLDocument2ScopedAPI) appropriate for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 10:44 AM
hmmm
Is XMLDocument2(https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=c_XMLDocument2ScopedAPI) appropriate for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 11:44 AM
You are correct. made the quick change to XMLDocument2 and it worked like a charm. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 12:09 PM
welcome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 10:45 AM
Seems like XMLDocument can not be called from another scope except global