Using a PHP5 SOAP client with DirectFlight

I’m attempting to use PHP5’s SOAP support with DirectFlight, but when I try to create the SOAP client as follows:


$wsdlDirectFlight = "http://flightaware.com/commercial/directflight/data/wsdl1.xml";

$DirectFlight_Authentication = array(
    'user'          => 'myusername',
    'pass'          => 'mydirectflightkey'
);

$client = new SoapClient($wsdlDirectFlight, $DirectFlight_Authentication);


I get this exception:

SOAP-ERROR: Parsing Schema: attribute ‘Error’ already defined

Any ideas, anyone?

Thanks!

Is there any way to get slightly more verbose debugging that indicates a line number in the WSDL where the parser has an error?

Unfortunately, it seems I can only get it to give me the line number of the PHP code from which I try to create the SOAP client, but no more details on the parsing problem.

Looking at the possible parameters (http://us3.php.net/manual/en/function.soap-soapclient-construct.php), I’ve tried a few other variations (such as soap_version SOAP_1_1 and SOAP_1_2), but it has not made a difference.

Got it. If you google for the problem, lots of people have weird, unexplained problems parsing WSDL with PHP5’s native SOAP functionality. Can you use PEAR-SOAP? That’s part of DirectFlight’s test suite here at FlightAware and is a popular library that lots of other customers are using.

I’ve just tried PEAR SOAP, and it seems to work fine. Now on to the fun part! Thanks for your help.