【发布时间】:2019-07-06 21:48:06
【问题描述】:
我正在循环调用 Web 服务并将参数从 DB 传递到 Web 服务。所有 Web 服务调用都在循环中获得响应。这是我的响应 XML 节点 [Siebel 响应][1][ 1]:https://i.stack.imgur.com/TRCE2.png
我现有的代码是
<!-- language: lang-js -->
for(db=0;db.length;db++) // db loop
{
//call webservice and get below is **employeeData is multiple soap webservice response** xml that is attached in the picture.
var soapEnv = new Namespace("SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/");
var rpc = new Namespace("http://siebel.com/asi/");
var siebelMessage = **employeeData**.soapEnv::Body.rpc::STEMIServiceRequestThinRefreshResponse.SiebelMessage;
default xml namespace = "http://www.siebel.com/xml/STE%20MI%20Service%20Request%20Thin%20Refresh";
var employee = siebelMessage.ListOfSteMIServiceRequestThinRefresh.ListOfServiceRequest["ServiceRequest"];
for each(var rootNodeVal in employee) {
// do parsing but it executes only the first response and exits any advice
}
}
【问题讨论】:
标签: javascript loops soap xml-parsing