Hello,
I am using Java NetBeans and trying to call decodeFlight function. it is throwing error:
Exception in thread “main” java.lang.IllegalArgumentException: faultCode argument for createFault was passed NULL
Any ideas?
here is my sample code:
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(“…”, “…”.toCharArray());
}
});
// Connect and authenticate
FlightXML2 locator = new FlightXML2();
// get the stub that provides the methods needed
FlightXML2Soap df = locator.getFlightXML2Soap();
FlightInfoExRequest ss = new FlightInfoExRequest();
ss.setHowMany(10);
ss.setIdent("N7732A"); //
ss.setOffset(0);
FlightInfoExStruct struct = (df.flightInfoEx(ss).getFlightInfoExResult());
for (FlightExStruct flight : struct.getFlights()){
System.out.println(flight.getFaFlightID());
DecodeFlightRouteRequest fr = new DecodeFlightRouteRequest();
fr.setFaFlightID(flight.getFaFlightID());
DecodeFlightRouteResults frResult = df.decodeFlightRoute(fr); //this line of code threw exception
}