php nusoap "wrong # of args" error

Hi,

I am using PHP5 with nusoap and have successfully pulled data from the following API calls: Enroute, Scheduled, MapFlightBeta. My code (below) seems to work great when more than one argument being passed but will give me the following error on calls with only one argument, such as InFlightInfo:

Array ( [faultcode] => NONE [faultstring] => wrong # args: type InFlightAircraftStruct contains " ident string prefix string type string suffix string origin string destination string timeout string timestamp int firstPositionTime int longitude float latitude float groundspeed int altitude int heading int altitudeStatus string updateType string altitudeChange string " [detail] => Array ( [errorInfo] => Array ( [errorCode] => NONE [stackTrace] => wrong # args: type InFlightAircraftStruct contains " ident string prefix string type string suffix string origin string destination string timeout string timestamp int firstPositionTime int longitude float latitude float groundspeed int altitude int heading int altitudeStatus string updateType string altitudeChange string " while executing “SOAP::insert_value $retnode $result” (procedure “SOAP::reply” line 17) invoked from within “SOAP::reply [dom::DOMImplementation create] $methodNamespace “${methodName}Response” $msg” ) ) )

My code:

$param = array(‘ident’ => ‘SWA1594’);
$result = $proxy->call(‘InFlightInfo’,$param);

Also, on the Search API call, I am using the following code:

$param = array(‘-destination LAX’,10,0);
$result = $proxy->call(‘Search’,$param);

… and the response is:
Array ( [next_offset] => -1 [aircraft] => Array ( !SOAP-ENC:offset] => [0] !] => ) )

Any thoughts from anyone?

Thanks,
Todd

UUUUhhhhhhhhhhhhh…What?!?

I get the same error when calling the Search method.
It worked the last time I used it about a month ago.
I obtained the latest WSDL after reading it was obdated, but it did not fix the error.

I am using VB.Net 2005.

Here is my code.

Dim nextoffset as Int32 = 0
Dim ifstruct As InFlightStruct = df.Search(“-aboveAltitude 180”, 15, nextoffset)

Here is the error.

System.Web.Services.Protocols.SoapException was unhandled
Message=“wrong # args: type InFlightAircraftStruct contains "
ident string
prefix string
type string
suffix string
origin string
destination string
timeout string
timestamp int
firstPositionTime int
longitude float
latitude float
groundspeed int
altitude int
heading int
altitudeStatus string
updateType string
altitudeChange string
"”
Source=“System.Web.Services”
Actor=“”
Lang=“”
Node=“”
Role=“”
StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object] parameters)
at DirectFlight.Search(String query, Int32 howMany, Int32 offset)

Please try running your query again. This may have been a bug on our side.

I’m using nusoap also but am having problems getting the thing to work at all for me.

Can someone post a complete example of a call to FlightAware using nusoap?

Thanks,

Andrew

I managed to resolve that issue and have search working now.

I’m looking for a complete description of all of the parameters returned by Search (particularly the lat/long related ones). Also is there anyway to get the arrival time or flight duration directly from search?

Here is what I’m getting back. I can’t find explanations of a number of the parameters online.


    [next_offset] => -1
    [aircraft] => Array
        (
            [0] => Array
                (
                    [altitudeStatus] => C
                    [groundspeed] => 284
                    [origin] => LL40
                    [altitudeChange] => 
                    [type] => TBM7
                    [destination] => KAAO
                    [faFlightID] => N123ZC-1214223391-29028
                    [highLongitude] => -87.7402801514
                    [departureTime] => 1214228700
                    [highLatitude] => 41.4511108398
                    [altitude] => 240
                    [ident] => N123ZC
                    [firstPositionTime] => 1214228758
                    [lowLongitude] => -93.5333328247
                    [suffix] => G
                    [lowLatitude] => 39.2330551147
                    [heading] => 244
                    [longitude] => -93.5333328247
                    [latitude] => 39.2330551147
                    [timestamp] => 1214232719
                    [updateType] => TZ
                    [prefix] => 
                    [timeout] => ok
                )

The fields are documented here.

Not really, for example :
[highLongitude]
[highLatitude]
[lowLongitude]
[lowLatitude]

Are not mentioned anywhere. Do you have a complete list with descriptions of each field?

Also (second question) is there anyway to get arrival time for a specific flight from ‘Search’ results?

Ideally what I would like to see is either the existing InFlightAircraftStruct with EstimatedArrivalTime added or (less desirable) an option to have EnrouteFlightStruct as the output data structure of ‘Search’.

Thanks

Andrew

The documentation hasn’t kept up with the implementation. high/low lat/long are the maximum and minimum values seen during the flight. faFlightId is the unique* identifier we’ve assigned to the flight.

No, you’ll need to make another query for that.