Page 1 of 1

JQuery Ajax Call zum SOAP -Webdienst - Zugriff verweigert. Arbeiten in der SOAP -UI

Posted: 14 Apr 2025, 00:03
by Anonymous
JQuery Ajax Call to Soap Web Service löst eine Ausnahme als "Zugriff verweigert" aus. Siehe Screenshot. Es arbeitet in der SOAP -Benutzeroberfläche, so dass die SOAP -Anfrage korrekt erscheint. Bitte helfen Sie bei der Suche nach Problemen und Behebung.

Code: Select all



Calling Web Service from jQuery


$(document).ready(function () {
jQuery.support.cors = true;

$("#btnCallWebService").click(function (event) {
var wsUrl = "https://webservices..myservice.../";
var soapRequest = 'efhueeudedujeddfdjfhdkjfa';

$.ajax({
type: "POST",
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: processSuccess,
error: processError
});

});
});

function processSuccess(data, status, req) {
if (status == "success")
$("#response").text($(req.responseXML).find("HelloResult").text());
}

function processError(data, status, req) {
alert(req.responseText + " " + status);
}





Calling Web Services with jQuery/AJAX

Enter your name: