title: Unable to connect to WSDL
body: <p>I was working with older version of OpenSSL(OpenSSL 0.9.8o) and I was forced to use newer OpenSSL 1.0.1e-fips as the result I was unable to connect to WSDL:</p>
  
  <p><code>Message: SoapClient::SoapClient(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</code></p>
  
  <p>I need to disable SSL certification check, I tried:</p>
  
  <pre class="lang-php prettyprint-override"><code>    $client = new SoapClient("https://IP:443/sdk/vimService?wsdl",
          array(
              "trace" =&gt; 1,
              "location" =&gt; "https://IP:443/sdk/",
              "stream_context" =&gt; stream_context_create(
                  array(
                      'ssl' =&gt; array(
                          'verify_peer'       =&gt; false,
                          'allow_self_signed' =&gt; true,
                      )
                  )
              )
          ) 
      );
  </code></pre>
  
  <p>`</p>
  
  <p>And it throw:</p>
  
  <p><code>Message: SoapClient::SoapClient(): Peer certificate CN=</code>localhost.localdom' did not match expected CN=<code>SAME IP AS IN SoapClient()'</code></p>
  
  <p>Then I added <code>'peer_name'=&gt; 'localhost.localdom',</code> in <code>stream_context</code> and then it says XML file is empty:</p>
  
  <p><code>Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document</code></p>
  
  <p>PHP 5.5</p>