title: PHP - SOAP with SSL : "Parsing WSDL: Couldn't load from..."
body: <p>I'm losing my mind here.</p>
  
  <p>I used the same webservice with soap with login/password, it always worked fine. But now my client wants to use ssl.
  He gave me a new url and everything, but I can't find a way to make it work.</p>
  
  <p>I obtain <code>Parsing WSDL: Couldn't load from 'service.jsp?wsdl' : failed to load external entity "service.jsp?wsdl</code>.</p>
  
  <p>Oh, and with curl it works, so there is definitively a problem with my parameters.</p>
  
  <p>Here is my code (found on a forum) :</p>
  
  <pre><code>$soap = new SoapClient("service.jsp?wsdl"
      ,array("stream_context"=&gt;stream_context_create(
                array(
                   "location"=&gt;"https://xxxxxxx/services/",
                  "ssl"=&gt;array(
                      "verify_peer"=&gt;true
                      ,"allow_self_signed"=&gt;false
                      ,"cafile"=&gt;$certif
                      ,"verify_depth"=&gt;5
                      ,"CN_match"=&gt;"https://xxxxxxx/services/"
                      )
                  )
              )
          )
      );
  </code></pre>
  
  <p>I've tried so much different things that I don't know what's important or not…</p>
  
  <p>Can someone help me ?</p>