ServiceCatalog


The Server Object Manager (SOM) maintains a list of services and their properties, such as name, type, and folder. The ServiceCatalog class is the ArcObjects type that maintains this list for the SOM. Although ServiceCatalog is not a server type, it maintains a Web Service Description Language (WSDL) to provide access to service information on an ArcGIS Server site via the SOAP application programming interface (API). The ServiceCatalog proxy is named Catalog and mirrors the methods and properties of the ArcObjects IServiceCatalog interface.
Two important differences between the SOAP proxy and ArcObjects Component Object Model (COM) proxies are as follows:
  • The Catalog proxy is a native Java object. IServiceCatalog is an interface to a remote COM object on the SOM (ArcSOM.exe).
  • Input parameters and output results share a common naming scheme but are different object types. The Catalog proxy uses native Java objects (value objects), while the ArcObjects interface uses references to remote COM objects in the SOM.
The following sample code illustrates the use of selected methods to accomplish a common action (iterating through a list of services). This sample uses the Web service SOAP proxy (Catalog) and value objects included with the Web Application Developer Framework (ADF) com.esri.arcgisws library.
[Java]
String endpoint = "http://myserver:8399/arcgis/services";
ServiceCatalogBindingStub catalog = new ServiceCatalogBindingStub(new java.net.URL
    (endpoint), null);
ServiceDescription[] sds = catalog.getServiceDescriptions();
for (ServiceDescription sd: sds){
    System.out.println("Service Name: " + sd.getName());
    System.out.println("Service Type: " + sd.getType());
    System.out.println("Service Parent Type: " + sd.getParentType());
    System.out.println("Service Name: " + sd.getUrl());
    System.out.println("Capabilities: " + sd.getCapabilities());
}