AnsweredAssumed Answered

How to consume a GPService in desktop ArcObjects?

Question asked by sclark98 on May 14, 2012
Latest reply on Sep 22, 2015 by FGibson-esristaff
Probably a simple question but I am confused as to how to consume a GPService (from our server) in a desktop ArcObjects application. The rest service is http://myserver/ArcGIS/rest/services/CSUDataConversion/GPServer/GisToCad and the url is http://myserver/ArcGIS/services/CSUDataConversion/GPServer. All I got so far is:

IGeoProcessor2 geoprocessorTask = new GeoProcessorClass();
geoprocessorTask.AddToolbox(@"http://myserver/ArcGIS/services;GP/CSUDataConversion");
IVariantArray parameters = new VarArrayClass();
parameters.Add("out.dwg");
parameters.Add("param2");
parameters.Add("param3");
IGeoProcessorResult results = geoprocessorTask.ExecuteASync("GisToCad", parameters);

Is this even close to the approach I should be doing?

Outcomes