geoprocessing service result.

679
4
10-08-2012 05:21 AM
NadeemQazi
New Contributor III
I have built a Geo processing servive using tool box. the  service take three inputs in the form of shape files and apply buffer operation on the input resulting out another shape file. When i run this tool it worked fine however when i published this as geoprocessing service than i have received following message from the server
submitted- executed- successed.
however the result object as return by the python after executing this service does not have the output shape file.
with following error:
ResultObject: Error in getting output.
I have also checked the arcgis server job directory and output directory and there is no shape file created there.
is there any way i can access the shape file created from the geoprocessing service.  below is my code i used for this

arcpy.env.workspace="C:\\NHQ_Project_WWTP\\GP_Taks_byNhq"
cities="C:\\pythonarcgisStudent\\geog485\\Lesson1\\Lesson1\\us_cities.shp"
bnd="C:\\pythonarcgisStudent\\geog485\\Lesson1\\Lesson1\\us_boundaries.shp"
distance="5 miles"
roads="C:\\pythonarcgisStudent\\geog485\\Lesson1\\Lesson1\us_roads.shp"
arcpy.ImportToolbox("http://na-lap-3z8/ArcGIS_server/services;Lesson1_editedon9oct","abc")
result= arcpy.abc.suitablelandfromparammodel(cities,distance,distance,bnd,roads)
while result.status<4:
time.sleep(0.2)
print result.status
print "execution finshed"
result.getMessages()
arcpy.CopyFeatures_management(result.getOutput(0),'resy.shp')
regards
nadeem
0 Kudos
4 Replies
ShingLin
Esri Contributor
Which server are you using
0 Kudos
ShingLin
Esri Contributor
I mean what version of Server.
0 Kudos
NadeemQazi
New Contributor III
I mean what version of Server.


I am using ARCGIS server 10.0
0 Kudos
ShingLin
Esri Contributor
Which one is your output class? You need to write the output to the scratch folder if it is a shape file, and scratch gdb if it is a feature class.
0 Kudos