Tengo que hacer una petición a un webservice SOAP, enviando el request con Advanced Rest Client con la siguiente configuración funciona:
Pero con el siguiente código usando Jquery, no:
$.ajax({
method: "POST",
url: "https://....asmx",
contentType: "application/soap+xml; charset=\"utf-8\"",
data: soapBody,
processData: false,
success: function( response ){
console.log(response)
},
error: function(){
console.log( "ERROR", arguments );
}
});
Sale el siguiente error:
XMLHttpRequest cannot load https://....asmx. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
Estuve leyendo que tiene que ver con CORS, pero ¿hay algo que pueda hacer del lado del cliente? ¿Por que funciona con ARC pero no desde localhost con XAMPP?
Desde ya muchas gracias.
error: XXX
?