Error 400 Cannot perform query.  Invalid Query Parameters

4769
2
10-13-2011 01:26 PM
PeteVitt
Occasional Contributor III
I'm sending a featureset of points created in flex to a geoprocessing service and am getting the subject error.  When I built the script and published the service I configured the service to accept featureset as the input -- Does anyone have an idea of what is causing this problem? 

below is my function that calls the geoprocessor

protected function GetUnMarkedTicketSuccess(event:ResultEvent):void
  {
   //successful return of Ticket Centers from .Net
   ArrUnMarked  = event.result as ArrayCollection;
   var spatRef:SpatialReference = new SpatialReference(4269);//geographic nad83
   var pnt:MapPoint;
   var x:Number;
   var y:Number;
   var graphic:Graphic;
   var arrPts:Array = new Array();
   var fs:FeatureSet;
   for (var i:int=0; i < ArrUnMarked.length;i++)
   {
    x=ArrUnMarked.getItemAt(i).ptCenterX as Number;
    y=ArrUnMarked.getItemAt(i).ptCenterY as Number;
    pnt = new MapPoint(x,y,spatRef);
    graphic = new Graphic(pnt);
    arrPts.push(graphic);
   }
   fs = new FeatureSet(arrPts);
   fs.spatialReference = spatRef;
   fs.geometryType="MAPPOINT";
   //call geoprocessing service to project the points to web mercator projection
   FlexGlobals.topLevelApplication.CenterLatLongService.execute(fs);
   FlexGlobals.topLevelApplication.CenterLatLongService.addEventListener(GeoprocessorEvent.EXECUTE_COMPLETE,CenterLatLongExecComplete);
   FlexGlobals.topLevelApplication.CenterLatLongService.addEventListener(FaultEvent.FAULT,faultHandler);
  
  
  }

Thanks

Pete
Tags (2)
0 Kudos
2 Replies
PeteVitt
Occasional Contributor III
When I look at the service it is expecting a GPFeatureRecordSetLayer -- is this the same thing?  The gp service works on the desktop when a shapefile is the source of the featureset records
0 Kudos
PeteVitt
Occasional Contributor III
just in case anyone searches on the error code: got the answer from ESRI Tech suuport --

had a bad geometry type and the spatial reference needed to be specified on the feature set, not individual points

fs.geometryType = "esriGeometryPoint";
fs.spatialReference=spatRef;
0 Kudos