Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

XMLDocument no longer works

dbrennan
Kilo Contributor

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

1 ACCEPTED SOLUTION
8 REPLIES 8

You are correct.   made the quick change to XMLDocument2 and it worked like a charm.   Thanks!


welcome


Seems like XMLDocument can not be called from another scope except global