Field Aliases missing in JSON response for geoprocessing service

Discussion created by flspat on Nov 30, 2011
Latest reply on Mar 8, 2012 by ciava.at
Hello All:

I'm exposing some of our more complex analytical processes thru Geoprocessing services.  This has proved extremely efficient, reducing client side code and maintainability.  The integrated nature of the GP server with the WebAPIs also makes these very easy to access and execute.  However we've run into one issue and while minor in the larger pictures, causes majors headaches in the client code. 

Basically we've found that the "featureset" returned by the geoprocessing service is missing the field aliases when you use the 'JSON' format in the REST API. However they DO come thru in the SOAP API (ArcGIS Explorer test) and the REST API if you select format = HTML or KMZ.  If we use any of the WebAPIs the field aliases are missing. 

Here's a simple way to test:

1. Create a simple feature class with a few records and a few columns with alias names
2. Create a python script that opens and returns the feature class

#any feature class with aliases
output = "C:\\arcgisserver\\Temp.gdb\\AliasTest"

3. Load the script to a toolbox
4. Publish the toolbox as a service

5. Access the GP service in ArcGIS Explorer... field aliases are displayed
6. Access the GP service in the REST wisywig page with format = HTML... field aliases are display
7. Access the GP service in the REST wisywig page with format = JSON... Aliases attribute is missing  in the JSON featureset JSON structure. 
8. Access the GP service with any of the WebAPIs ---  same as the JSON result
9. Access the GP service with the REST wisywig page with format KMZ... GE opens and the aliases are displayed.

Again it's not a show stopping issue but without the aliases the field names are no longer user friendly and if we have to code the aliases in the client application is makes it harder to maintain and change the service on the fly. 

Is anyone else able to reproduce this?  Is there a specific setting needed to get the aliases to come thru or is it a bug?  Seems odd the aliases would be available for Google Earth/KMZ but not supported in the JSON for the WebAPIs