Developing Web Applications with the Web ADF - Working with resources and functionalities  

Geoprocessing with ArcGIS Server



There are a number of methods and techniques for working with the geoprocessing capabilities of ArcGIS Server. The following discussion presents the options for working with geoprocessing using the Web ADF, from an ArcGIS Server developer perspective.

Web ADF Geoprocessing components

Assuming that a toolbox has been published as a GP service - and creating a Web application, the easiest option for working with a GP service is to use the Web ADF task framework to configure a geoprocessing task (Web task). Each Web task is associated with a tool or model in a GP service (server task). If the geoprocessing server task is associated with a map document, the Web task will recognize and utilize it.
  1. For non-developers, you can use Manager to consume a geoprocessing server task and configure the geoprocessing Web task, without opening Visual Studio or writing any code.
  2. For developers, in Visual Studio you can:
    1. Work with task framework controls (e.g. TaskManager, TaskResults, GeoprocessingTask). At runtime, the Web ADF geoprocessing task dialog is generated for you, based on the inputs required for the GP service task (see GP data type conversion table below).  If working with the Web Mapping Application template (e.g. the website created by Manager), the Web ADF controls needed to utilize geoprocessing tasks have been added for you.  In general, the GP server task input and outputs are managed for you.
    2. Work with Web ADF's IGeoprocessingFunctionality via custom code. You can create the user interface for the GP server task and explicitly manage input and output values. The IGeoprocessingFunctionality interface enables you to submit asynchronous jobs, execute synchronous jobs, check their status, get results, etc. It works with a Web ADF maintained set of the GP value types (prefixed GP* in ESRI.ArcGIS.ADF.Web.DataSources). 
    3. Work with the Web ADF GP proxies and Value objects.  In general, if working with existing GP services and you need more control over the GP process than provided in IGeoprocessingFunctionality -or- you don't need the overhead associated with a resource manager, resource and functionality, use the GPServer proxy and Value objects (in ESRI.ArcGIS.ADF.ArcGISServer). There is a Web service proxy (GPServerProxy) for ArcGIS Server Internet data sources and a DCOM proxy (GPServerDcomProxy) for ArcGIS Server local data sources—both can be used with an existing resource or standalone. The Web service proxy is available via the GeoprocessingResourceInternet.GPServerProxy property. The DCOM proxy is available via the GeoprocessingResourceLocal.GPServerProxy property. Both also work with the GP Value object types in the ESRI.ArcGIS.ADF.ArcGISServer namespace (prefixed GP*).   This is a good lightweight option for implementation within a custom Web service.

Basic Geoprocessing components for .NET

The Web ADF includes some basic geoprocessing components available for the Microsoft .NET development environment.  They can be utilized in a Web ADF application, but are not restricted to it.  You have a few options depending on the type of access, local or internet, you have to ArcGIS Server.  
  1. Local access to ArcGIS Server

    If you want to work with a well known toolbox, tool and/or model on the GIS Server, without using an existing GP service, use the .NET Geoprocessor wrapper with an empty server context. 
    1. IGPServer—The server object type available for existing GP services. Probably the easiest way to work with existing GP services using ArcObjects. Full control over task execution on the server. Works with a specific set of GP value types provided in ESRI.ArcGIS.Geoprocessing. You can provide a set of features entered by the user as well as work with layers in an associated map document.
    2. Geoprocessor - .NET wrapper for the IGeoProcessor COM object. Can be used with existing system toolboxes and custom toolboxes on the server (empty server context) or locally. The wrapper is meant to provide .NET developers with better design-time information (intellisense) than working with COM objects and interfaces. It does not provide data type information for tools or models explicitly. More information about tool or model parameters can be discovered using ArcObjects—IToolboxWorkspace, IGPToolbox, IGPTool, IGPParameter.
    3. IGeoProcessor—COM interface to the ArcObjects GeoProcessor COM object. Like the .NET Geoprocessor wrapper, it can be used with existing system and custom toolboxes on the server (empty server context) or locally. It provides the finest level of detail for working with geoprocessing tools and models. Like the .NET wrapper, it does not provide data type information for tools or models explicitly. More information about tool or model parameters can be discovered using ArcObjects—IToolboxWorkspace, IGPToolbox, IGPTool, IGPParameter.
  2. Internet access to ArcGIS Server
    1. GPServer proxy—Existing GP services can be exposed as ArcGIS Server Web services. They provide a GP service specific WSDL which can be used to generate a set of client-side Value objects and a Web service proxy to work with geoprocessing on the GIS Server. The Value objects include a set of GP specific types (prefixed GP*) and the Web service proxy provides a set of methods to submit asynchronous jobs, execute synchronous jobs, check their status, get results, etc. This option can be used without installing any ESRI software.