Map service GetDocumentInfo method

Gets a set of map service properties that can be used to describe the general content of the service.

GetDocumentInfo()

Return Value

A PropertySet of name-value pairs used to store map service properties. The properties include Title, Subject, Author, Category, Keywords and Comments.

Remarks

The "Document" in this object references the map document (MXD) used by the map service. The properties are string values set in the map document's Map Properties dialog. Providing map document information is not required.

Examples

C#

MapService_MapServer mapservice = new MapService_MapServer();

mapservice.Url = "http://localhost:6080/arcgis/services/MapLayerCache/MapServer";

 

PropertySet documentproperties = mapservice.GetDocumentInfo();

PropertySetProperty[] propertyarray = documentproperties.PropertyArray;

 

foreach (PropertySetProperty documentprop in propertyarray)

{

      string key = documentprop.Key.ToString();

      string value = documentprop.Value.ToString();

}

VB.NET

Dim mapservice As MapService_MapServer = New MapService_MapServer()

mapservice.Url = "http://localhost:6080/arcgis/services/MapLayerCache/MapServer"

 

Dim documentproperties As PropertySet = mapservice.GetDocumentInfo()

Dim propertyarray() As PropertySetProperty = documentproperties.PropertyArray

Dim documentprop As PropertySetProperty

Dim key As String

Dim value As String

 

For Each documentprop In propertyarray

      key = documentprop.Key.ToString()

      value = documentprop.Value.ToString()

Next

Java

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

MapServerBindingStub mapService = new MapServerBindingStub(serviceURL);

 

PropertySet documentProperties = mapService.getDocumentInfo();

PropertySetProperty[] propertyArray = documentProperties.getPropertyArray();

 

for (PropertySetProperty documentProp : propertyArray)

{

      String key = documentProp.getKey();

      System.out.println("Property Name: " + key);

 

      String value = documentProp.getValue().toString();

      System.out.println("Property Value: " + value);

}

11/8/2016