Soap Web服务和JavaScript解析

时间:2019-02-13 08:51:59

标签: javascript xml soap

我正在循环调用一个Web服务,并将参数从数据库传递到Web服务。所有Web服务调用都在循环中得到响应。

这是我的响应XML节点:

<!-- language: lang-js -->



 for(db=0;db.length;db++)
    {
    //called webservice here **and below employeeData is multiple soap webservice response** xml that is attached in the picture. 

//Namespaces
    var soapEnv = new Namespace("SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/");
    var rpc = new Namespace("http://siebel.com/asi/");
//end namespaces

    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"];

// Loop through Service Request node 
    for each(var rootNodeVal in employee) {

    // do parsing but it executes only the first soap xml response and exits any advice
    }

    }

enter image description here

0 个答案:

没有答案