第二次调用后的SOAP服务异常

时间:2019-03-30 00:19:52

标签: soap demandware

我创建了一个SOAP服务,该服务从远程服务器获取一些数据。

第二次通话后,我总是会遇到异常:

  

stackTrace:org.w3c.dom.DOMException:WRONG_DOCUMENT_ERR:在与创建该文档的节点不同的文档中使用了一个节点。

任何想法可能有什么问题吗?

function getInstance () {
    return LocalServiceRegistry.createService('SaveNewCustomerService', new SaveNewCustomerServiceObject());
}

function SaveNewCustomerServiceObject() {};

SaveNewCustomerServiceObject.prototype.initServiceClient = function() {
    this.webReference  = webreferences.CustomerWS;
    return this.webReference.getDefaultService();
}
SaveNewCustomerServiceObject.prototype.createRequest = function(svc, params) {
    return params;
}
SaveNewCustomerServiceObject.prototype.execute = function(svc, requestObject) {
    var customerRequestObjTest = new webreferences.CustomerWS.SaveNewCustomer();
    if (requestObject != null) {
        setObj(); //reduced 
    }
    var result;
    try{
        result = svc.serviceClient.saveNewCustomer(customerRequestObjTest);
        var a =result;
    }catch(ex){
        var e = ex; // 
        if(e.faultString == "Import error"){
            log.info("Import error" + e.faultDetail);
        }else{
            log.info(e.faultDetail);
        }
    }

    return result;
}

SaveNewCustomerServiceObject.prototype.parseResponse = function(svc, responseObject) {
    return responseObject;
}

0 个答案:

没有答案