<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: error  call the GP Server  in flex 4.6 in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43577#M1014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What version of the API are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is your param?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share a complete test?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2012 16:56:05 GMT</pubDate>
    <dc:creator>DasaPaddock</dc:creator>
    <dc:date>2012-09-07T16:56:05Z</dc:date>
    <item>
      <title>error  call the GP Server  in flex 4.6</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43576#M1013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;
&amp;lt;fx:Declarations&amp;gt;
&amp;lt;esri:Geoprocessor&amp;nbsp; executeComplete="gp_jobCompleteHandler(event)"&amp;nbsp; useAMF="false"&amp;nbsp; showBusyCursor="true"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="gp"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://yanli/arcgis/rest/services/gp1/GPServer/polygon"/&amp;gt;

&amp;lt;/fx:Declarations&amp;gt;
gp.execute(param);&amp;nbsp; //&amp;nbsp; error&amp;nbsp; here!!!

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when&amp;nbsp; i&amp;nbsp; chang the&amp;nbsp; code&amp;nbsp; with&amp;nbsp; setting&amp;nbsp; "URL" null&amp;nbsp; ??the&amp;nbsp; error&amp;nbsp; is&amp;nbsp; same .... but&amp;nbsp; the param&amp;nbsp; have&amp;nbsp; the&amp;nbsp; value,the GP server run&amp;nbsp; well&amp;nbsp; in the ArcMAP&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

&amp;lt;fx:Declarations&amp;gt;
&amp;lt;esri:Geoprocessor&amp;nbsp; executeComplete="gp_jobCompleteHandler(event)"&amp;nbsp; useAMF="false"&amp;nbsp; showBusyCursor="true"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="gp"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url=""/&amp;gt;

&amp;lt;/fx:Declarations&amp;gt;
gp.execute(param);&amp;nbsp; //&amp;nbsp; error&amp;nbsp; here!!!

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I&amp;nbsp; am&amp;nbsp; carazing&amp;nbsp;&amp;nbsp;&amp;nbsp; !!!!!!!!!!!!!!!now &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the error&amp;nbsp; message&amp;nbsp; as following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size:1;"&gt;TypeError: Error #1009:Can not access a property or method of a null object reference???&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.utils::GeometryUtil$/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.esri.com/2008/ags/internal::normalizeCentralMeridian2()&amp;lt;C&amp;gt;" rel="nofollow" target="_blank"&gt;http://www.esri.com/2008/ags/internal::normalizeCentralMeridian2()&lt;C&gt;&lt;/C&gt;&lt;/A&gt;&lt;BR /&gt; at com.esri.ags.utils::GeometryUtil$/normalizeCentralMeridian()&lt;C&gt;&lt;BR /&gt; at com.esri.ags.tasks::Geoprocessor/toURLVariables()&lt;C&gt;&lt;BR /&gt; at com.esri.ags.tasks::Geoprocessor/execute()&lt;C&gt;&lt;BR /&gt; at test2/onQueryResult()&lt;C&gt;&lt;BR /&gt; at mx.rpc::AsyncResponder/result()&lt;E&gt;&lt;BR /&gt; at com.esri.ags.tasks::QueryTask/handleExecute()&lt;C&gt;&lt;BR /&gt;&lt;SPAN&gt; at Function/&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://adobe.com/AS3/2006/builtin::call" rel="nofollow" target="_blank"&gt;http://adobe.com/AS3/2006/builtin::call&lt;/A&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;BR /&gt; at com.esri.ags.tasks::BaseTask/loaderCompleteHandler()&lt;C&gt;&lt;BR /&gt; at flash.events::EventDispatcher/dispatchEventFunction()&lt;BR /&gt; at flash.events::EventDispatcher/dispatchEvent()&lt;BR /&gt; at flash.net::URLLoader/onComplete()&lt;/C&gt;&lt;/C&gt;&lt;/E&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:22:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43576#M1013</guid>
      <dc:creator>yanli</dc:creator>
      <dc:date>2012-09-07T14:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: error  call the GP Server  in flex 4.6</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43577#M1014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What version of the API are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is your param?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share a complete test?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 16:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43577#M1014</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-09-07T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: error  call the GP Server  in flex 4.6</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43578#M1015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My arcgis&amp;nbsp; Api for&amp;nbsp; flex&amp;nbsp; vesion&amp;nbsp; is&amp;nbsp; :2.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcigs server version&amp;nbsp; is :10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;flash builder version :4.6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://www.esri.com/2008/ags"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"&amp;gt;
 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;esri:Geoprocessor&amp;nbsp; executeComplete="gp_jobCompleteHandler(event)"&amp;nbsp;&amp;nbsp; showBusyCursor="true"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="gp"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://yanli/arcgis/rest/services/gp1/GPServer/polygon"/&amp;gt;

 &amp;lt;/fx:Declarations&amp;gt;
 &amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; import com.esri.ags.FeatureSet;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.GeoprocessorEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.layers.GPResultImageLayer;
&amp;nbsp;&amp;nbsp; import com.esri.ags.layers.supportClasses.ImageParameters;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.QueryTask;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.Query;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.JobInfo;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; import mx.controls.Alert;
&amp;nbsp;&amp;nbsp; import mx.rpc.AsyncResponder;
&amp;nbsp;&amp;nbsp; import mx.rpc.events.FaultEvent;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private var&amp;nbsp; jobid:String="";
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function gp_jobCompleteHandler(event:GeoprocessorEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (event.jobInfo.jobStatus == JobInfo.STATUS_SUCCEEDED)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("sueeseful!")
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function computesevice():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask:QueryTask =new QueryTask("http://localhost/arcgis/rest/services/test/MapServer/0");
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.showBusyCursor=true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var query:Query=new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields=new Array("OBJECTID","yuliang","name")
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where="name&amp;lt;&amp;gt;''"
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,new AsyncResponder(onQueryResult,onQueryFalt));
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; function&amp;nbsp; onQueryFalt(info:Object,token:Object=null):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; private function onQueryResult(featureset:FeatureSet,token:Object=null):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var param:Object={"inputpoint":featureset};;
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.execute(param);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;
 &amp;lt;s:Button label="�?�?�GP" click="computesevice()"/&amp;gt;
 &amp;lt;esri:Map y="30" id="myMap" width="100%"&amp;nbsp; height="100%" &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;!--&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:extent&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:Extent xmin="-95.41" ymin="38.86" xmax="-95.1" ymax="39.06"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:SpatialReference wkid="4326"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;/esri:Extent&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;/esri:extent&amp;gt;--&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISDynamicMapServiceLayer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://localhost/arcgis/rest/services/test/MapServer"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:GraphicsLayer id="graphicsLayer"&amp;nbsp; /&amp;gt;
 &amp;lt;/esri:Map&amp;gt; 
&amp;lt;/s:Application&amp;gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:40:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43578#M1015</guid>
      <dc:creator>yanli</dc:creator>
      <dc:date>2021-12-10T21:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: error  call the GP Server  in flex 4.6</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43579#M1016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting "returnGeometry" to true on your Query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/tasks/supportClasses/Query.html#returnGeometry"&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/tasks/supportClasses/Query.html#returnGeometry&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 21:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43579#M1016</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-09-10T21:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: error  call the GP Server  in flex 4.6</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43580#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Other troubleshooting steps would be to test your GP service using its REST page. If the service gives you the expected results back, it should work in your flex code.&amp;nbsp; Other things to check would be what gets sent in the http request. You can use firebug here to help. Copy the FeatureSet JSON representation and then test it using your REST page.&amp;nbsp; Also make sure your GP service is synchronous, as I see you are using execute vs submitJob.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 04:16:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-nbsp-call-the-gp-server-nbsp-in-flex-4-6/m-p/43580#M1017</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-09-20T04:16:04Z</dc:date>
    </item>
  </channel>
</rss>

