Server returned an invalid SOAP Fault


#1

I am getting an error trying to access the methods in this class. The connection seems to work for other classes.
ArrayOfAirlineFlightScheduleStruct results = client.AirlineFlightSchedules(today.Seconds, tomorrow.Seconds, “”, “”, “”, “”, 100, 0);
foreach (var rr in results.data)
{
System.Console.WriteLine(rr.actual_ident + " " + rr.aircrafttype + " " + rr.departuretime + " " + rr.origin + " " + rr.arrivaltime + " " + rr.destination);
}
Actual error in InnerException reads: {“End element ‘Fault’ from namespace ‘http://schemas.xmlsoap.org/soap/envelope/’ expected. Found element ‘SOAP-ENV:detail’ from namespace ‘http://schemas.xmlsoap.org/soap/envelope/’. Line 2, position 384.”}

What can I do to make AirlineFlightSchedules work? I am a subscribed user with an API Key.

Thanks!


#2

Hello,

Can you please double check the Seconds values you’re using and how errors are being handled by your app? From our logs it looks like you are requesting schedules too far in the past by using a Seconds value of less than 100 (or in the year 1970 by UNIX epoch time).

AirlineFlightSchedules will only search up to three months in the past. Requests further back that that window will result in an error message instead of a struct result.


#3

Yes you are right, i was going too far behind. Once adjusted, it’s working fine. Thank you much!