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.
This particular API call requests a string for a membership number:
$wsdl='https://domain.com/ws.asmx?wsdl';
$client=new SOAPClient($wsdl, array('exceptions'=>0));
$result=$client->IsMemberCurrent('123456789');
Error:
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'domain/ws.asmx?wsdl' : Start tag expected, '<' not found in index.php on line 4
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?
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
<?xml version="1.0" encoding="utf-8"?>
<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">
<soap12:Body>
<IsMemberCurrent xmlns="http://www.domain.com/">
<MembershipNo>string</MembershipNo>
</IsMemberCurrent>
</soap12:Body>
</soap12:Envelope>