title: How to create a PHP SOAP Client for calling a WCF Web service under SSL?
body: <p>We have a WCF service under an SSL Web Server installed in IIS. The web service was created with .NET 3.5 and WCF 3.0. <strong>We can access it with a .NET 3.5 client without problems</strong>.</p>
  
  <p>Let's call the URL where the service is published something like:</p>
  
  <p><a href="https://my-server.com/testservice.svc?wsdl" rel="nofollow noreferrer">https://my-server.com/testservice.svc?wsdl</a></p>
  
  <p>We need to make a proof of concept to check if it's possible to access it with a PHP client. I've tried to use NuSOAP or the standard SoapClient of PHP but in both cases i get an exception. Here is my code:</p>
  
  <pre><code>&lt;?php
    $wsdl = 'https://my-server.com/testservice.svc?wsdl';
    $client = new SoapClient($wsdl);
  ?&gt;
  </code></pre>
  
  <p>It returns me an exception with this message:</p>
  
  <blockquote>
    <p>Error:sendSms: SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from '<a href="https://my-server.com/testservice.svc?wsdl" rel="nofollow noreferrer">https://my-server.com/testservice.svc?wsdl</a>' in C:\localhost\test.php:5 Stack trace: #0 C:\localhost\test.php(5): SoapClient->SoapClient('<a href="https://my-serv" rel="nofollow noreferrer">https://my-serv</a>...') #1 {main} "</p>
  </blockquote>
  
  <p>Any ideas? What am I doing wrong?</p>