Select to view content in your preferred language

Error #2032: Stream Error on QueryTask

2336
3
11-18-2010 05:58 AM
PeteVitt
Frequent Contributor
I'm getting this error when I run my querytask:
Error #2032: Stream Error. URL: http://localhost:2709/query?f=amf&spatialRel=esriSpatialRelIntersects&outFields=AgencyID&returnGeome...

My set up code is:

<esri:QueryTask id="queryTask"
url="http://www.myServer/ArcGIS/rest/services/WaterAgenciesFlex/MapServer/2"/>


[Inject("queryTask")]
   public var queryTask:QueryTask=new QueryTask();
//execute the query:
public function doQueryStreamAll():void
   {
    var aQuery:Query=new Query();
    aQuery.outSpatialReference=theMap.spatialReference;
    aQuery.outFields=["AgencyID", "AgencyName"];
    aQuery.returnGeometry=false;
   
   
    queryTask.execute(aQuery, new AsyncResponder(onQuerySuccess, onQueryFail));
   }

Any Ideas what could be happening?  I'm running this OnCreationComplete in an attempt to get all the agencynames and agencyids from a layer and put them in a combo box when the application first opens.  I know that the path to the service is correct and I've run other queries successfully to this service

Thanks

Pete
Tags (2)
0 Kudos
3 Replies
Drew
by
Frequent Contributor
0 Kudos
PeteVitt
Frequent Contributor
Same error unfortunately
0 Kudos
Drew
by
Frequent Contributor
After looking closer, something is wrong in your code.
You have �??QueryTask�?� declared twice. Once in Markup and once in code�?�

Remove the lines I outlined below.
[Inject("queryTask")]
public var queryTask:QueryTask=new QueryTask();
0 Kudos