Hello,
I’m using flightaware API 1.0 to track some flights, when i use the method FlightInfo() with JAF flights (ex: JAF1618,JAF1617 …) i get SoapFault error , the message indicates ‘looks like we got no XML document’ , ths problem occurs only with JAF flights .
Anyone else with this problem?
You’re using FlightXML 1, not FlightXML 2? We really recommend you use FlightXML 2 for new application development, if possible. Additionally, using FlightInfoEx instead of FlightInfo would be ideal.
What programming language are you developing from?
Would it be possible to provide a small sample program that replicates this problem for us?
I tried FlightXML2 , it shows me a Soap faullt error with this message ‘Method invalid command name “domNode0x207c8ce0 domNode0x12c225b0 domNode0x207c8c90” not found’ .
Im using PHP and this is the code that im using with FlightXML 1:
<?php
class ServiceInfosFlight
{
public function connectApi()
{
$options = array(
'trace' => true,
'exceptions' => 0,
'login' => 'NavetteVatry',
'password' => 'xxxxxxxxxxxxxxxxxxxxx',
);
$client = new SoapClient('https://fr.flightaware.com/commercial/flightxml/data/wsdl1.xml', $options);
return $client;
}
public function flightInf($code)
{
$client = $this->connectApi();
$result=$client->FlightInfo($code,15);
return $result;
}
}
$sif= new ServiceInfosFlight();
var_dump($sif->flightInf('JAF1618'));
die;
?>
and this is the code with flightXML 2:
<?php
class ServiceInfosFlight
{
public function connectApi()
{
$options = array(
'trace' => true,
'exceptions' => 0,
'login' => 'NavetteVatry',
'password' => 'xxxxxxxxxxxxxxxxxxxxxxx',
);
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);
return $client;
}
public function flightInf($code)
{
$client = $this->connectApi();
$result=$client->FlightInfoEx($code,15,0);
return $result;
}
}
$sif= new ServiceInfosFlight();
var_dump($sif->flightInf('JAF1618'));
die;
?>
I really appreciate any help you can provide.
Can you try the following? I believe you just need to pass the arguments in an array, as shown on our PHP SoapClient example:
public function flightInf($code)
{
$client = $this->connectApi();
$params = array("ident" => $code, "howMany" => 15, "offset" => 0);
$result=$client->FlightInfoEx($params);
return $result;
}
works great , thank you