Tag: enyo

如何访问SOAP响应属性?

所有 最近几天我找到了如何使用JS访问soap,毕竟我从这个链接得到了解决方案Simplest SOAP示例 现在我能够提醒我的肥皂请求。 但我想使用它的属性,并希望打印响应(我的意思是解析响应和显示) 这是我的代码 var xmlhttp = new XMLHttpRequest(); xmlhttp.open(“POST”, “http://service.project-development-site.de/soap.php”,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4) { alert(xmlhttp.responseText); // http://www.terracoder.com convert XML to JSON var json = XMLObjectifier.xmlToJSON(xmlhttp.responseXML); var result = json.Body[0].GetQuoteResponse[0].GetQuoteResult[0].Text; // Result text is escaped XML string, convert string to XML object then convert to JSON object json = XMLObjectifier.xmlToJSON(XMLObjectifier.textToXML(result)); […]