Trying to connect to the web service via SOAP. Available certificate p12 to connect. I studied this question and came to the following: the certificate needs to be converted to .pem for use with the soap client. Converted (used openssl-function - openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts ).
Connection process:
$wsdl = 'https://domain.com:8077/iicwebservice.asmx?wsdl'; $certificate = __DIR__ . '/certKeys/my.cert.pem'; $password = '111111'; $options = array( 'keep_alive' => true, 'trace' => true, 'exception' => true, 'local_cert' => $certificate, 'passphrase' => $password, 'cache_wsdl' => WSDL_CACHE_NONE ); try { $soapClient = new SoapClient($wsdl, $options); } catch(Exception $ex) { var_dump($ex); } As a result, in response, I get:
Couldn't load from ' https://domain.com:8077/iicwebservice.asmx?wsdl ': failed to load external entity " https://domain.com:8077/iicwebservice.asmx?wsdl "
The certificate path is verified, it is in order.
I tried to connect via SoapUI, the connection was passed the first time. True certificate put in the original form (.p12).
Tell me the solution.