Our customer just bumped their ArcGIS server from 10.05 to 10.11, and they re-published their MXD to the new server.
I need some details from a feature service, so at some point I fetch the service by initializing a feauture layer, synchronously:
NSError *error = nil; AGSFeatureLayer *lyr = [[AGSFeatureLayer alloc] initWithURL:url mode:AGSFeatureLayerModeOnDemand credential:[Globals getCredential] error:&error]; if (!lyr.fields) { /* a problem */ }
Now. Of course I have.. a problem.. Looking at the ?f=pjson on the two services, they look the same to me. But in the debugger, the layer just does not seem correct at all:
I´m about to try 10-1-1-u1 and cross some fingers, but I submitted this app for review yesterdays so it´s already kind of sad. Attached the json for both new and old feature services. Any ideas what is going on?
The error was as suspected, that /rest/info?f=json returned an invalid token service url.
The constructor (above) takes an AGSCredential. This object only has a username/password, and needs the token service url. So when runtime asks AGS server for the token URL, bad things happen.
In 10.1, the token service url is somehow fetched from some URL header (afaik, this is not my table, but in 10.0 this could be configured in some config) - so the IT guys had to make ssome DNS/reverse proxy/firewall tuning to make this run.
Its pretty strange though, that the synced constructor of AGSFeatureService did not return an error (is nil in my case) here, but initialized with some funny 9.3-values.
The error was as suspected, that /rest/info?f=json returned an invalid token service url.
The constructor (above) takes an AGSCredential. This object only has a username/password, and needs the token service url. So when runtime asks AGS server for the token URL, bad things happen.
In 10.1, the token service url is somehow fetched from some URL header (afaik, this is not my table, but in 10.0 this could be configured in some config) - so the IT guys had to make ssome DNS/reverse proxy/firewall tuning to make this run.
Its pretty strange though, that the synced constructor of AGSFeatureService did not return an error (is nil in my case) here, but initialized with some funny 9.3-values.