I am having trouble getting even the most simple GP service to work when accessing via the browser/javascript apis. I'm on my 3rd GP Service test (now the simplest) and always get the same error.I created a "BufferPoint" GP service following the tutorial at http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/GP_service_st...I can successfully test the "submitJob" operation of the GP Service by putting the data into the form at the REST service url http://myserver/ArcGIS/rest/services/test/test/GPServer/BufferPoint/submitJoblike this:Value for Point (GPFeatureRecordSetLayer):
{
"geometryType" : "esriGeometryPoint",
"spatialReference" : {"wkid" : 3857},
"features" : [
{
"geometry" : {"x" : -13087726.5, "y" : 6444025.3},
"attributes" : {"Id" : 43, "Name" : "Feature 1"}
}
]
}
Value for Distance (GPLinearUnit):
{"distance" : 3000, "units" : "esriMeters"}
The javascript was taken directly from the samples:
gp = new esri.tasks.Geoprocessor("http://myserver/ArcGIS/rest/services/test/test/GPServer/BufferPoint");
gp.setOutSpatialReference({wkid:3875});
var graphic = new esri.Graphic(evt.mapPoint,pointSymbol);
var features= [];
features.push(graphic);
var featureSet = new esri.tasks.FeatureSet();
featureSet.features = features;
var buffDistance = new esri.tasks.LinearUnit();
buffDistance.distance = 3000;
buffDistance.units = "esriMeters";
var params = { "Point":featureSet, "Distance":buffDistance };
gp.submitJob(params, drawBuffer, statusCallback,function(error){
alert(error);
});
I also tried hand coding the JSON definition I used in the REST service test and get the same error:
var featureJSON = {
"geometryType" : "esriGeometryPoint",
"spatialReference" : {"wkid" : 3857},
"features" : [
{
"geometry" : {"x" : -13087726.5, "y" : 6444025.3},
"attributes" : {"Id" : 43, "Name" : "Feature 1"}
}
]
};
var featureSet = new esri.tasks.FeatureSet(featureJSON);
[...]
Any ideas on what I need to do to find the reason for the error?Thanks!