s.arndtesri-de-esridist

Using GP Service with JS API

Discussion created by s.arndtesri-de-esridist Employee on May 17, 2011
Latest reply on May 18, 2011 by s.arndtesri-de-esridist
Hi,

i'm trying to use the JavaScript API to process a Geoprocessing Service. This Service works fine with the ArcGIS Server WebApplication. Now i want to use it with JS. The GP Service needs a Shapefile as Input Parameter.

So i read the Webhelp, the JS API Concepts and had a look at the Esri Samples. Then i tried to implement it. First like the samples, then in a more easy way with less code (just the basics).
But in no Case the Service is used.

I'm not very experienced with JavaScript, so probably there is a mistake in my Code. Perhaps in the Structure or with the Parameters. I attached the simple basic-Code with just one button to this Thread. Can anybody please have a lokk at it and check if everything is ok?

Because i'm not 100% sure if the service needs a Shapefile or a String to the Shapefile, i tried several opportunities.

var inputLayer = "http://wk2658/ArcGIS/rest/services/scotturb/FeatureServer/0";
var inputLayer = "C:\arcgisserver\scotturb\scotturb_lines_ida_half_test.shp";
var inputLayer = new esri.layers.FeatureLayer("http://wk2658/ArcGIS/rest/services/scotturb/FeatureServer/0");
var inputLayer = new esri.layers.FeatureLayer("C:\arcgisserver\scotturb\scotturb_lines_ida_half_test.shp");


I'm using:
ArcGIS Server 10 SP2 .NET Framework
Read/Write Permissions are correct i think.

Attachments

Outcomes