Search Method in FlightXML2


#1

Hello there,

I am trying to use Search method provided in FlightXML2, but it producing output with Server UNKNOWN_METHOD.

Following is my code:

$query = “-origin KRDU”;
$result = $client->Search($query,15,0);

Output:

SoapFault Object ( [message:protected] => Method invalid command name “domNode0x11ffdb00 domNode0x11ffdb50 domNode0x11ffdba0” not found [string:Exception:private] => [code:protected] => 0 [file:protected] => D:\xampp\htdocs\Test\flightaware.php [line:protected] => 20 [trace:Exception:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => Search [1] => Array ( [0] => -type B77* [1] => 15 [2] => 0 ) ) ) [1] => Array ( [file] => D:\xampp\htdocs\Test\flightaware.php [line] => 20 [function] => Search [class] => SoapClient [type] => -> [args] => Array ( [0] => -type B77* [1] => 15 [2] => 0 ) ) ) [previous:Exception:private] => [faultstring] => Method invalid command name “domNode0x11ffdb00 domNode0x11ffdb50 domNode0x11ffdba0” not found [faultcode] => CLIENT [detail] => stdClass Object ( [errorInfo] => stdClass Object ( [errorCode] => Server UNKNOWN_METHOD {invalid command name “domNode0x11ffdb00 domNode0x11ffdb50 domNode0x11ffdba0”} ) ) )


#2

Were you able to figure this out? Your code seems to work for me. I assume you were using PEAR SOAP/Client? Here’s the full script that I tried:



require_once( "SOAP/Client.php" );    # PEAR SOAP/Client

#date_default_timezone_set('UTC');

$DirectFlight_Authentication = array( */
			     'user'          => 'sampleUser',
			     'pass'          => 'abc123abc123abc123abc123abc123abc123',
			     );
 

$wsdl_url = 'http://flightxml.flightaware.com/soap/FlightXML2/wsdl';
$WSDL = new SOAP_WSDL($wsdl_url,$DirectFlight_Authentication);
$soap = $WSDL->getProxy();

$query = "-origin KRDU";
$result = $soap->Search($query,15,0);

print_r($result);