如何使用https创建ajax xml请求

时间:2016-11-08 13:12:29

标签: jquery ajax xml

我试图用AJAX执行SOAP。我发送了与SOAPUI一样的XML和URL。作为回应我得到:

  

net :: ERR_INSECURE_RESPONSE

var dataXml =
    "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"htpp://request.xsd\">" +
    "<soapenv:Header/>" +
    "<soapenv:Body>" +
    /*data*/ 
    "</soapenv:Body>" +
    "</soapenv:Envelope>";

$.ajax({
    url: 'https://url:8090/route',
    data: dataXml, 
    type: 'POST',
    contentType: "text/xml; charset=UTF-8",
    headers: {
        SOAPAction: '/SOAPActionFromSoapUI'
    },
    dataType: "text",
    success : function (data, textStatus, jqXHR) { 
        alert("ok");
    },
    error : function (data, textStatus, jqXHR) {
        alert("error");
    } 
}); 

在SOAPUI中,我看:

POST https://url:8090/route HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "/SOAPActionFromSoapUI"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: url:8090
Content-Length: 673

如何获得安全连接?

0 个答案:

没有答案