REST Query task does not reproject output

Discussion created by phanmore on Oct 28, 2013
We have recently run across a problem with our Server 10.0 SP5 installations.  It appears this was working in SP2 but broken in SP5.

In our map document, we have a layer (from a file geodatabase) which is joined to multiple tables with a 1-1 relationship to each table (one parent, multiple children - no nested joins).  When we query this layer through the REST endpoint, the query will run fine with the exception of the Output Spatial Reference.  No matter what WKID is used for the spatial reference, it will always return the location in the coordinate system of the layer (4269 in this case).  Even a single joined table will cause the layer to stop projecting.  The interesting thing is that the JSON response will actually show the desired WKID value but the coordinates are always geographic.  I added the layer to the map document again, without any joins, and this layer will project without any problems when querying.

We installed the same map document on a server which was still at SP2 and this server functions as expected - if no Output Spatial Reference is defined, the location is returned in the projection defined for the map document (web mercator).  If we specify the projection to be WKID 4269, we get geographic coordinates back.

Has anyone else noticed this behaviour from Query tasks?  If so, is there a fix or workaround for it?