title: SOAP Web Service on ASP server consumed via PHP
body: <p>I'm trying to use a Web Service using PHP and SOAP.  The Web Service is built in .NET and hosted on an ASP server. I'm using the following code to interact with the API but I keep getting an error with parsing WSDL.  The PHP UNIX server has an SSL certificate, the web service host also has an SSL certificate and I'm using https to initiate the transaction.</p>
  
  <p>This particular API call requests a string for a membership number:</p>
  
  <blockquote>
    <p>$wsdl='<a href="https://domain.com/ws.asmx?wsdl" rel="nofollow noreferrer">https://domain.com/ws.asmx?wsdl</a>';</p>
    
    <p>$client=new SOAPClient($wsdl, array('exceptions'=>0));</p>
    
    <p>$result=$client->IsMemberCurrent('123456789');</p>
  </blockquote>
  
  <p>Error:</p>
  
  <pre><code>Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'domain/ws.asmx?wsdl' : Start tag expected, '&lt;' not found in index.php on line 4
  </code></pre>
  
  <p>I can see the WSDL contents but the error message I'm getting via PHP suggests it either can't see or can't process the WSDL file?</p>
  
  <pre><code>SOAP 1.2 service description:POST /SubscriberAPI.asmx HTTP/1.1
  Host: subdomain.domain.com
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;IsMemberCurrent xmlns="http://www.domain.com/"&gt;
        &lt;MembershipNo&gt;string&lt;/MembershipNo&gt;
      &lt;/IsMemberCurrent&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  </code></pre>