Select to view content in your preferred language

GPService error on in Flex App

779
1
06-07-2011 05:37 AM
francescodi_vito
Deactivated User
Hi guys,
i develop a sample model and after i publish it. Now when i run my model in REST he works very well.
This model have one Parameter that i set on model (datatype:GPDouble). i attach a screenshot of the model.
Now i would like to use this GP Service in a Flex App and i wrote this code:

<fx:Script>
  <![CDATA[
  
   import com.esri.ags.tasks.supportClasses.ParameterValue;
  
   import mx.controls.Alert;
   import mx.rpc.events.FaultEvent;
  
   private var Val1:Number = new Number();
  

  
   protected function gpExecute_clickHandler(event:MouseEvent):void
   {
    Val1 = Number (Val.text);
    var params:Object = {
    
     "Valore": Val1
    };
    geoprocessor.execute(params);

   }
  
   protected function geoprocessor_faultHandler(event:FaultEvent):void
   {
    Alert.show("No Results found.\n" + event.fault.message.toString() )
   }
  
  
  
  
  ]]>
</fx:Script>

now  when in flex i run my model i have a error. the error is:
No Results found.
faultCode:400 faultString:'Execute operation is not allowed on this service.' faultDetail:''
What is the error?...My code is wrong?
Help me please!
Any post is good
Tags (2)
0 Kudos
1 Reply
IvanBespalov
Frequent Contributor
As i see in your fault message: "Execute operation is not allowed on this service".

Read help to find witch operations (submit job, execute ...) are allowed:
http://yoursevername/ArcGIS/SDK/REST/index.html?gpserver.html
0 Kudos