I want to consume a saop request in react native. But the problem is in self-signed ssl certificate on the backend. So the question. Is there any way to skip this validation certificate?
I use this code :
xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', 'https://xxx.xxx.xxx.xxx:1443/orawsv/user/WSS_USER_LOGIN/GETLOGIN', true);
// build SOAP request
sr =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'+
' xmlns:get="http://xmlns.oracle.com/orawsv/user/WSS_USER_LOGIN/GETLOGIN">'+
' <soapenv:Header/>'+
' <soapenv:Body>'+
'<soapenv:Body>' +
'<get:CGETLOGIN_OUT-GETLOGINInput>'+
'<get:SQLMSGIN-GETLOGIN_IN-CIN>'+
' <get:GETLOGIN_IN>'+
' <get:LOGIN>login</get:LOGIN>'+
' <get:PASSWORD>password</get:PASSWORD>'+
' </get:GETLOGIN_IN>'+
'</get:SQLMSGIN-GETLOGIN_IN-CIN>'+
'</get:CGETLOGIN_OUT-GETLOGINInput>'+
'</soapenv:Body>' +
'</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
console.log(xmlhttp.responseText);
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
console.log('done. use console to see network response');
console.log(xmlhttp.responseText);
}
}
}
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
console.log('send');
}
And the complete error is:
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.