Routing Task in iOS

2455
13
08-31-2011 11:35 PM
FrankLin1
New Contributor
Hi,I'm using the sample from arcgis online samples(RoutingSample),
i changed the url to my custom url:
"http://10.211.55.4/ArcGIS/rest/services/g/NAServer/Route"
(the service runs in paralles and access from mac)
finally it comes with an error when "[self.routeTask retrieveDefaultRouteTaskParameters]"
Error:
RoutingSample[727:207] Error: Error Domain=org.brautaset.JSON.ErrorDomain Code=3 "Unrecognised leading character" UserInfo=0x6223540 {NSLocalizedDescription=Unrecognised leading character}

(But the url works with api for js.)
Thanks!
Frank
0 Kudos
13 Replies
NimeshJarecha
Esri Regular Contributor
Which version of ArcGIS Server is installed?
Any security configured?

Regards,
Nimesh
0 Kudos
FrankLin1
New Contributor
Hi,I'm running version 10.0,no security config.

Thanks for replying.
Frank
0 Kudos
NimeshJarecha
Esri Regular Contributor
It should work. If possible, can you please share your NAServer URL?

Regards,
Nimesh
0 Kudos
FrankLin1
New Contributor
The attatchment is the map we used.

Regards,
Frank
0 Kudos
NimeshJarecha
Esri Regular Contributor
Frank,

Thank you for providing the data. I published service on  ArcGIS Server for Java (v10 + SP2) and ArcGIS Server for .NET (v10 + SP2), tested with Route Sample and did not came across any error. Please try to intercept the request/response being sent from app to server to diagnose this further.

Regards,
Nimesh
0 Kudos
FaisalSabri
New Contributor
Hi,

I'm using RoutingSample From Esri

i changed the url to my custom url but when it comes to execute the route task ,
[self.routeTask solveWithParameters:self.routeTaskParams];

i got this Error :

Error Domain=NSCocoaErrorDomain Code=400 "Error solving route" UserInfo=0x602c5a0 {NSLocalizedFailureReason=There was an error generating the XML document., NSURL=http://91.140.226.23/ArcGIS/rest/services/NetworkService_Test/NAServer/Route/solve?f=json, NSLocalizedDescription=Error solving route}

Any Help 🙂

Thanks ..
0 Kudos
NimeshJarecha
Esri Regular Contributor
Are you able to solve route with the same URL on browser?

Regards,
Nimesh
0 Kudos
FaisalSabri
New Contributor
Are you able to solve route with the same URL on browser?

Regards,
Nimesh


i have tested the network in silverlight and in ArcDesktop and it's working , but i did not try in browser , is it going to be different from the browser ??

i have tested in the browser and it's working ,

this the error from the NSURL(http://91.140.226.23/ArcGIS/rest/services/NetworkService_Test/NAServer/Route/solve?f=json) when run it on the browser

{"error":{"code":500,"message":"Object reference not set to an instance of an object.","details":[]}}


by the way i'm running on ArcGIS Server 9.3

i will tested in 10.0

and come back to u
0 Kudos
NimeshJarecha
Esri Regular Contributor
I asked you to test it in the browser because of the error, "There was an error generating the XML document.". The ArcGIS API for iOS deals with JSON and it no where creates XML document. There seems to be something wrong at server and it's a server error.

Please share your server configuration of v9.3.1 and v10.

Regards,
Nimesh
0 Kudos