Accessing server objects with the AGSClient API


ArcGIS Desktop and Engine developers can access server objects and use the server objects' stateless methods via the ArcGIS Server Client application programming interface (API) (AGSClient). This API provides a single set of objects for connecting to, and executing methods on, server objects and their extensions either directly over a local area network (LAN) or connecting to, and executing methods on, server objects and server object extensions that have been published as Web services over the Internet. The AGSClient API is in the GISClient object library.
The AGSServerConnection object provides connections to the geographic information system (GIS) server and ArcGIS Server Web service catalogs. The AGSServerConnection object is shown in the following illustration.
AGSClient includes objects and methods for connecting to GIS servers either directly or through Web service catalogs to make use of MapServer, GeocodeServer, GeodataServer, and GlobeServer objects. AGSClient differs from the Server API in that it restricts clients to calling only the coarse-grained methods on the server object and does not provide access to the finer-grained ArcObjects associated with a server object. The IAGSServerConnection interface and its methods are shown in the following table.
The AGSClient objects can be used to connect to a GIS server either via a LAN connection (by specifying the machine property in the connection) or via a Web service catalog (by providing the uniform resource locator [URL] property in the connection). The AGSClient object provides a uniform programming interface for working with server objects through both LAN connections and Web service connections.
You can make stateless use of server objects that you get from an AGSClient connection and call methods exposed by the server object's stateless interfaces; however, you cannot use a server object obtained via AGSClient to drill down to the finer-grained ArcObjects associated with the server object. You can get a reference to ServerObjectManager through the AGSClient connection, provided that connection is a LAN connection. You can then use the methods exposed by ServerObjectManager to obtain references to server contexts and server objects to work with the server API.
It's also possible to access server objects and server object extension Web services directly by any development language that can submit Simple Object Access Protocol (SOAP)-based requests to a Web service and process SOAP-based responses. For more information about exposing server objects and server object extensions as Web services, and accessing those Web services directly, see the ArcGIS Web Services topic.