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 = "";

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

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

I get this exception:

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

Any ideas, anyone?



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 (, 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.