Мне нужен ответ SOAP для вывода всего ответа или отдельных значений.Я старался всегда идти к ошибочному разделу, а не к успешному разделу, даже если это успешный запрос и ответ.
$.ajax({
url: "some url",
data: soapLogin,
type: "post",
//crossDomain: false,
//processData: false,
//contentType: 'application/xml',
dataType: "xml",
success: data => {
console.log(" SUCCESS :");
},
error: function(xhr) {
var responseCode1 = $(this).find("responseCode").text;
$(xhr).find("responseCode").each(function() {
var responseCode1 = $(this).text();
console.log(" error msg11 :" + responseCode1);
});
//console.log(" Success msg :"+xhr.toString);
//console.log(" Success msg :"+xhr.toXML);
console.log(" error msg :" + responseCode1.toString);
if (xhr.responseCode == 4)
console.log(" error msg :" + xhr.responseCode);
else {
console.log(" error msg not coming " + xhr.responseMsg);
var resss = $(xhr);
console.log(" error msg not coming " + resss.responseMsg);
console.log("error : " + $(xhr).find("responseMsg").text());
}
},
complete: function(xmlHttpRequest, status) {
$(xmlHttpRequest.responseXML).find("createNewCmntPost").each(function() {
var responseMsg = $(this).find("responseMsg").text();
console.log(" error msg coming " + responseMsg);
});
}
});