submitJob / output file problems

877
3
Jump to solution
10-12-2012 12:01 PM
Jay_Gregory
Occasional Contributor III
Hi, I have a simple geoprocessing service exposed to REST on ArcGIS for Server 10.0 (I've attached the screenshot here). 
Using the JS API, I have a submitJob task that runs the geoprocessing tool (a lot of code was taken from this sample).  However, the result KMZ file doesn't seem to be in the directory that job info claims.  I modified the downloadfile function to
function downloadFile(outputFile){         console.log("downloading");   map.graphics.clear();   console.log(outputFile);         var theurl = outputFile.value.url;           //window.location = theurl;       }
.
The outputFile.value.url is http://myservername/arcgisjobs/airportsexport2_gpserver/j154fac0763164443b0ad3456c4b4220f/scratch/re..., but when I navigate to that directory on the server, there is no results.kmz file there. 
Is something wrong with my model?  Where is the KMZ file?

On a somewhat related note, is this the best way to generate a KMZ from a user defined polygon?  I know I can query the REST entpoint directly, but I'm unsure how to do that without directly making a GET or POST AJAX request in Javascript?  But mostly, where is that KMZ file?

Thanks for your help....

Jay
[ATTACH=CONFIG]18396[/ATTACH]
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
You'll probably have better luck over in the server forum:  http://forums.arcgis.com/forums/214-ArcGIS-10.1-for-Server-General

View solution in original post

0 Kudos
3 Replies
Jay_Gregory
Occasional Contributor III
An update to this post:

The output file does appear correctly in an entirely different directory: the one in which my original mxd exists and from which I built the service and imported into ArcGIS Server Manager. When I built my model in ModelBuilder, I made sure to check the "store relative path names" and specify the output directory of the results.kmz file to be %scratchworkspace%\export.kmz. So why is the output file going to a completely different directory and not the arcgisjobs directory?

Thanks for your help!

Jay
0 Kudos
derekswingley1
Frequent Contributor
You'll probably have better luck over in the server forum:  http://forums.arcgis.com/forums/214-ArcGIS-10.1-for-Server-General
0 Kudos
Jay_Gregory
Occasional Contributor III
Found the answer! See
this post
0 Kudos