Select to view content in your preferred language

Error Sending Json (KML) file into ArcServer 10.0 GP Service

3317
2
02-01-2016 12:23 PM
DanielKonde
Deactivated User

Im working with a PHP script that POSTs to a ArcGIS 10 Flex Server's GPService Toolbox (written in python), the first parameter is supposed to be a GPDataFile. From the documentation, it looks like I can set the value of this parameter to a json formatted string literal, {"url", "http://localhost/export/1234567890.kml"}, and the arcpy.GetParameter(0) should handle this object correctly.

Unfortunately I am receiving an error, saying 'Please check your parameters', there are two other parameters on the toolbox but they are just strings and are working correctly. I am working in ArcGIS Server 10.0. Flex viewer.

The overall goal of this interaction is to send a KML file from our SWF/ActionScript to the PHP, which saves the KML to our database and subsequently sends it to the GPService to translate it into a GDB and then to individual insert the data into  oracle ArcSDE 10.0 database for rendering back to the SWF/Actionscript.

Any help our thoughts on how to get the Toolbox to accept the JSON structure would be greatly appreciated, I would like to avoid having to send the KML contents as a string object to the Toolbox.

0 Kudos
2 Replies
KevinHibma
Esri Regular Contributor

Do you have a reference to the doc you mentioned?

Everything you've said is correct. However, Server underwent many, many changes between 10.0 and 10.1. As such, I'm not 100% confident that you could use the {'url' : 'http://myfile'} method at 10.0. I'm 100% sure you can at 10.1. (If the doc you have was written for 10.0, then I'd take it as true you can use this method)

The other thing, and I'm sure you've tested it, but asking just to be sure - you can access the file you reference over HTTP?

0 Kudos
DanielKonde
Deactivated User

Kevin,

We are on ArcGIS Server 10.00 Service Pack 5 on a solar us box. I have tested the http json file. I can down loit. If I change the ending of the file to KML. I can run ESRI geoprocessing tools against the file like KML to layer. The documentation says I could use this method. The error has a 500 response mark when attempting lead

0 Kudos