Im trying to accomplish SOAP-post to get back XML data.
Problem is that "No 'Access-Control-Allow-Origin' header" and I suppose that the server needs to add the header.
So I created a MockService in SOAPui and copied the server response. But I still get the same problem. In soapUI in the response I added this https://i.stack.imgur.com/fpkFG.jpg
        function soap() {
        var sr = MySoapRequest;
        $.ajax({  
       url: url, 
        beforeSend: function(xhr) {
        xhr.setRequestHeader("SOAPAction", "x");
        }, 
        type: "POST",  
        dataType: "xml",  
        data: sr, 
        crossDomain: true, 
        success: function (data) {
            console.log(data);
        },
        error: function (error) {
        },
        contentType: "text/xml; charset=\"utf-8\"" 
        });
            }
 
     
    