Export image of GP tool layer does not work

Discussion created by s.offermannconterra-de-esridist Employee on May 24, 2012
Latest reply on May 29, 2012 by s.offermannconterra-de-esridist
I have a custom geoprocessing tool implemented in C#. The output is a GPRasterDataLayer. The tool is added as a tool layer to a blank ArcMap document. I have populated all parameters, set the scratch workspace to a folder and I have run the tool once. The output layer is added to the map as a sublayer to the tool layer as expected. The map is saved as mxd document and published to arcgis server, with MapServer and GeoprocessingServer capabilites enabled. Both services are created, the map server is the result service for the GP service.

I can execute the task sucessfully via REST interface of arcgis server. The problem is that the result only contains the URL to the gerenated tif file (parameter "out_result" of type GPRasterDataLayer), but the image can not be exported as a map image to be included in a javascript client.



  "paramName" : "out_result",
  "dataType" : "GPRasterDataLayer",
  "value" : {
    "url" : "http://server/arcgisjobs/movingwindowfunction_gpserver/jcb8dd75cc1e341ac94f03c59e298b97b/scratch/Moving Window.tif",
    "format" : "tif"

When using a map service as result service, this should not be the case regarding the documentation at:

Map Images as Results
Map images can be a result of a GP job. If a GP service is associated with a result map service, the results of GPFeatureRecordSetLayer and GPRasterDataLayer data types can be drawn by the result map service and hence can be provided to the client as a map image.
In such cases where the result is a map image, the value field for the GP parameter is a JSON structure with a mapImage field.

So the value should be a "mapImage", but instead it is "url" and "format". I think this is a bug.

My next try is to export the image of the result using the export parameter of the GP service with the following URL:


...which results in an error:
Specified format is not supported
Code: 400
Invalid URL

Nothing helpful can be found in ArcGIS Server and REST log :(

What can I do to get the map image from the associated map service of the GP service?

Best regards, Stefan