I send a request to a site to obtain the 3 nearest aviation weather stations to a specific location, providing the long/lat co-ordinates and my api key.
I get the results back BUT, I'm not populating the BO Records for some reason that I can't fathom. I know the results are correct because the specific location is my home airfield which is not itself a reporting weather station
So clearly my BO structure must be wrong but from the video tutorial, I can't figure out what I'm doing wrong
This is the returned data from the server logs. (Actually - this is just one of the three returned stations
REST Service returned:
[
{"station{
"city":"Manchester",
"country":"GB",
"elevation_ft":257,
"elevation_m":78,
"iata":"MAN",
"icao":"EGCC",
"latitude":53.35369873046875,
"longitude":-2.2749500274658203,
"name":"Manchester Airport",
"note":"Ringway Airport, RAF Ringway","reporting":true,
"runways":[
{"length_ft":10007,"width_ft":148,"ident1":"05R","ident2":"23L"},{"length_ft":10000,"width_ft":148,"ident1":"05L","ident2":"23R"}
],
"state":"ENG",
"type":"large_airport",
"website":"http://www.manchesterairport.co.uk/",
"wiki":"https://en.wikipedia.org/wiki/Manchester_Airport"
},
"coordinate_distance":0.5566678650945238,
"nautical_miles":20.06989913050994,
"miles":23.0960274432964,
"kilometers":37.169453189704406}
]
I have a BO called Airports and a BO called WeatherStations. The "runways" array is ignored. The only items that get written are the last 4 items which are at the outermost level of the data and written into "Airports".
Airports has a reference attrinute called Station which refers to WeatherStations. WeatherStations holds all the other attributes - but WeatherStations never get created.