title: Https webservice php
body: <p>Keep getting could not connect to host this is the server code that I have</p>
  
  <pre><code>  &lt;?php 
    ini_set('soap.wsdl_cache_enabled',0);
    ini_set('soap.wsdl_cache_ttl',0);
  
    $soap_server = new SoapServer('Notification.wsdl');
    $soap_server-&gt;addFunction('Notify');
  
    function Notify($message)
    {
        return array('message' =&gt; $message);
    }
  
    $soap_server-&gt;handle();
  
  
    ?&gt;
  </code></pre>
  
  <p>And this is my client code which is what is throwing the error. The endpoint is https. the wsdl file is local.</p>
  
  <pre><code>    &lt;?php
  
  
       $context = stream_context_create(array(
  
        'https' =&gt; array(
        'cafile' =&gt; 'APX_WS_API1.cer',
        'verify_peer' =&gt; true
        )
        ));
  
       $soap_client = new SoapClient('http://localhost:8888/Receiver/Notification.wsdl', 
        array('stream_context' =&gt; $context,'local_cer' =&gt; 'APX_WS_API1.cer'));
  
       try{
       $result = $soap_client-&gt;__soapCall('Notify',array('message' =&gt; 'Hello World'));
       echo $result;
        }catch(SoapFault $e){
        echo "Error: " . $e-&gt;faultstring;
        }
  
  
           ?&gt;
  </code></pre>
  
  <p>Could someone please tell me what am i doing wrong. Thanks in advance</p>