我正在使用旧版本的OpenSSL(OpenSSL 0.9.8o),我被迫使用较新的OpenSSL 1.0.1e-fips,因为我无法连接到WSDL:
Message: SoapClient::SoapClient(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
我需要禁用SSL认证检查,我试过:
$client = new SoapClient("https://IP:443/sdk/vimService?wsdl",
array(
"trace" => 1,
"location" => "https://IP:443/sdk/",
"stream_context" => stream_context_create(
array(
'ssl' => array(
'verify_peer' => false,
'allow_self_signed' => true,
)
)
)
)
);
Run Code Online (Sandbox Code Playgroud)
`
它抛出:
Message: SoapClient::SoapClient(): Peer certificate CN=localhost.localdom'与预期的CN =不匹配SAME IP AS IN SoapClient()'
然后我添加'peer_name'=> 'localhost.localdom',了stream_context然后它说XML文件是空的:
Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML …
function makeCall(file, handlerFile, sendMethod, formData) {
//console.log(instance.files);
$.ajax({
url: handlerFile,
type: sendMethod,
xhr: function() { // Custom XMLHttpRequest
var xhr = $.ajaxSettings.xhr();
if(xhr.upload) { // Check if upload property exists
xhr.upload.addEventListener('progress', progressHandlingFunction.bind(file)); // For handling the progress of the upload
//xhr.upload.addEventListener('loadend', successHandler.bind(xhr));
}
//console.log(xhr);
return xhr;
},
beforeSend: beforeSendHandler.bind(file),
success: completeHandler.bind(file),
//error: errorHandler,
data: formData, // Form data
dataType: 'json',
cache: true,
//async: false,
contentType: false,
processData: false
});
}
$(".afu-input").on('change', function() {
var i = 0;
var length = …Run Code Online (Sandbox Code Playgroud)