Closed Velocedge closed 11 years ago
I guess you are developing in IE. Try installing a different browser (Chrome or FireFox with Firebug) so you can proper debug/log your application. Simply console.log(SOAPResponse.toJSON()); and SEE what you got! With IE's Developers Tools, you will only get back a [object Object] which tells you nothing...
I did not check this, but I think you should leave out the soap:Body... what SOAPResponse.toJSON() returns is the contents of the soap:Body...
With IE I’m using VS 2010 and VS 2012 as my debugger and can see the properties of the response fine. That’s how I knew the first property was soap:Body as well as the LMSLaunchResponse and LMSLaunchResult properties under it. It “looks” like I should be able to reference them but I’m guessing the : is messing things up for IE.
However, it is interesting that in Chrome and FF I can get the value with rtn.Body.LMWLaunchResponse.LMSLaunchResult but in IE (8, 9, or 10) it’s undefined... everything’s basically undefined.
Found it... In IE you have to do rtn[“soap:Body”].LMSLaunchResponse.LMSLaunchResult
Interesting results... I will do some testing and see if I can come up with something so you can access the data in the same way for all browsers...
(What is your IE's version? I have IE9 here)
No worries... have it handled.
var soapHeader = ‘’; if (IE) soapHeader = 'soap:’; method = ‘LMSLaunch’; var result = rtn[soapHeader + ‘Body’][method + ‘Response’][method + ‘Result’];
sr
In the soap response I'd like to use var rtn = SOAPResponse.toJSON() and extract the returned value but don't know how to reference it. My action/method is LMSLaunch. It appears that it's under rtn.soap:Body.LMSLaunchResponse.LMSLaunchResult but I'm unable to reference it that way. What am I doing wrong... again! ;-)