deepikapals

Problem in passing mappoint to geoprocessing task via flex application

Discussion created by deepikapals on May 5, 2010
Latest reply on May 6, 2010 by dpaddock-esristaff
This is sample watershed geoprocessing task,which takes input from user as mappoint which is named as pourpoint in task.when i supply input interactively from Arcmap it runs successfully but when i tried to supply that pourpoint from my Flex application it gives error.

the geometry of mappoint is:

event.graphic.geometry.toString()=MapPoint[x=483296.9432867807,y=219407.33375396187,wkid=32145]

but it gives fault of invalid value for pourpoint.

CODE:
private function drawEndHandler(event:DrawEvent):void

            {

            

             Alert.show(event.graphic.geometry.toString());

         var featureSet:FeatureSet = new FeatureSet([event.graphic.geometry]);               

         var params:Object = new Object();

         params.pourpoint=featureSet;

         var geoprocessTask:Geoprocessor = new Geoprocessor();

             geoprocessTask.url = "http://wksnt13/ArcGIS/rest/services/Stowe/GPServer/CreateWatershedPolygonModel";

                geoprocessTask.submitJob(params);

                geoprocessTask.addEventListener(GeoprocessorEvent.JOB_COMPLETE,jobCompleteHandler);

                geoprocessTask.addEventListener(FaultEvent.FAULT, faultHandler);

            }

            private function jobCompleteHandler(e:GeoprocessorEvent):void

            {

             Alert.show("1234");

            }

           

            private function faultHandler(f:FaultEvent):void

            {

                Alert.show("Unexpected fault:\n" + f.toString());

            }  







ERROR:

Unexpected fault:

[FaultEvent fault=[RPC Fault faultString="" faultCode="400" faultDetail="Invalid value for parameter '<i>pourpoint</i>'"] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]

Outcomes