Select to view content in your preferred language

Geoprocessing service error.

663
2
08-24-2011 02:59 AM
SanajyJadhav
Deactivated User
Hi,

I want our users to have ability to determine the side of buffer (left/right) around a line feature.So, instead of Geometry service,I have published a GP service.It contains just one model (attached herewith) with only a buffer tool. GP service is published fine, I can see it in REST API.

However, when I use this service in code behind, I am getting an error 'GPTask 'SideBufferTool' does not exist or is inaccessible.'

Code:
[PHP]
//initialize gepreocessor task passing in the url of the published model.
            gpBufrTask = new Geoprocessor("http://gens003/ArcGIS/rest/services/SideBuffer/GPServer/SideBufferTool");            
            gpBufrTask.Failed += new EventHandler<TaskFailedEventArgs>(gpBufrTask_Failed);
            gpBufrTask.JobCompleted += new EventHandler<JobInfoEventArgs>(gpBufrTask_JobCompleted);

//define the input parmeters list
            List<GPParameter> inputParmas = new List<GPParameter>();           
            //geometry of the selected line feature
            inputParmas.Add(new GPFeatureRecordSetLayer("Input_Line", selectedStreetLst[0].Geometry));

            //distance to buffer
            inputParmas.Add(new GPLinearUnit("Buffer_Distance", esriUnits.esriMeters,50));

            //side to create buffer
            inputParmas.Add(new GPString("Side","LEFT"));
         
            //submit the job to gis server
            gpBufrTask.SubmitJobAsync(inputParmas);
[/PHP]

I am not sure, why I am getting this error.I have granted the necessary permission for ArcGISSOC to the folder containing this toolbox.Otherwise, it would not allow me to publish the service in the first place.

Can anybody help me fix this error.Any help would be appreciated.

-
Sanjay.
0 Kudos
2 Replies
BernardNtiamoah
Deactivated User
Copy and paste the gp service url into your browser and tell us what you get.
like this: http://servername/arcgis/services/foldername/GPServer/toolName?wsdl
0 Kudos
weiliang
Deactivated User
My suggestion is to test the GP service in ArcMap first to make sure the GP service itself is working correctly.

Wei
0 Kudos