5
Dear Friends, I am making an ajax request by JQuery.Ajax()
, to consume a WS SOAP, the envelope is OK but when I make the call I get in the browser "No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'null' is therefore not allowed access. The Response had HTTP status code 403."
The server is a Tomcat 7, I read about it and changed the Web.xml that this in the conf folder any more of this resulted in success where I can put this information Access-Control-Allow-Origin
Worth: *
Meu Ajax:
jQuery.support.cors = true;
//console.log(soapMessage);
var request = $.ajax({
type: "POST",
url: url ,
data: soapMessage,
async: false,
crossDomain: true,
contentType: "text/xml",
dataType: "xml"
}).done(function( data, textStatus, jqXHR ) {
alert(data);
var headline = $(data.responseText).text();
$("#retorno").html(headline);
});
Put dataType: "jsonp" and see if it goes.
– PauloHDSousa
See if this answer help you.
– Ivan Ferrer