Catalog server GetServiceDescriptions method

Gets an array of service descriptions that provide information on the type (e.g. MapServer), name, capabilities (e.g. Map), and URL endpoint of ArcGIS Server web services available. The services must be running to be included in the array of service descriptions.

GetServiceDescriptions()

Return Value

An array of ServiceDescription objects.

Remarks

Service descriptions provide a convenient way to programmatically traverse services available on an ArcGIS Server site. A service must be accessible by the identity defined via credentials on the Catalog SOAP proxy to return a service description.

Examples

C#

Catalog catalog = new Catalog();

catalog.Url = "http://localhost:6080/arcgis/services";

ServiceDescription[] servicedescriptions = catalog.GetServiceDescriptions();

foreach (ServiceDescription servicedesc in servicedescriptions)

{

      string name = servicedesc.Name;

      string type = servicedesc.Type;

      string parenttype = servicedesc.ParentType;

      string capabilities = servicedesc.Capabilities;

      string url = servicedesc.Url;

}

VB.NET

Dim catalog As Catalog = New Catalog()

catalog.Url = "http://localhost:6080/arcgis/services"

 

Dim servicedescriptions() As ServiceDescription = catalog.GetServiceDescriptions()

Dim servicedesc As ServiceDescription

 

For Each servicedesc In servicedescriptions

      Dim name As String = servicedesc.Name

      Dim type As String = servicedesc.Type

      Dim parenttype As String = servicedesc.ParentType

      Dim capabilities As String = servicedesc.Capabilities

      Dim url As String = servicedesc.Url

Next

Java

String serviceURL = "http://localhost:6080/arcgis/services";

ServiceCatalogBindingStub serviceCatalog = new ServiceCatalogBindingStub(serviceURL);

 

ServiceDescription[] sds = serviceCatalog.getServiceDescriptions();

for (int i = 0; i < sds.length; i++) {

      ServiceDescription sd = sds[i];

      System.out.println("Service Name: " + sd.getName());

      System.out.println("Service Capabilities: " + sd.getCapabilities());

      System.out.println("Service Type: " + sd.getType());

}

11/8/2016