我试图用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
如何获得安全连接?