Migrating a Java server object extension to 10.1

Migrating a Java server object extension developed for ArcGIS Server 10.0 to ArcGIS for Server 10.1 requires some modifications to the SOE's source code. This topic discusses the required modifications and describes a new Eclipse wizard for exporting Java SOEs. It also explains the absence of the SOEManager tool at ArcGIS 10.1.

Steps:
  1. Modify your SOE's ServerObjectExtProperties Java annotation.

    When an SOE is created using the Eclipse SOE creation wizard, the generated code includes a Java annotation called ServerObjectExtProperties, which holds metadata for the SOE. At ArcGIS 10.0, this annotation had the following attributes:

    • displayName—User-friendly display name of SOE
    • description—Multiline description of the SOE
    • defaultSOAPCapabilities and allSOAPCapabilities—Capabilities of the SOE
    • properties—Properties of the SOE as name = value pairs
    • supportsMSD—Flag to indicate that SOE supports MSD-based services

    At ArcGIS 10.1, with the introduction of service definition-based map services, the supportsMSD attribute is no longer required and has been removed. All other attributes remain unchanged. You must therefore modify your ArcGIS 10.0 Java SOE's ServerObjectExtProperties annotation to look similar to the following, to work at ArcGIS 10.1:

    @ServerObjectExtProperties(displayName = "Simple REST SOE", 
    	description = "My Simple REST Server Object Extension.",
    	defaultSOAPCapabilities = "", allSOAPCapabilities = "", 
    properties = "")
    
  2. Modify the SOE to use ArcGIS Server 10.1 map services.

    ArcGIS 10.1 does not support map services based directly on MXD documents; instead, it supports map services that are based on service definitions.

    You will therefore use the com.esri.arcgis.carto.IMapServerDataAccess interface to access layers available via a map service at ArcGIS 10.1. The following code snippet demonstrates how to obtain a handle to a feature class exposed as a layer via a service definition-based map service:

    IServerObjectHelper soh = . . .; //accessible to SOEs at runtime
    IMapServerDataAccess mapServerDataAccess = (IMapServerDataAccess)soh.getServerObject();
    IMapServer3 ms = (IMapServer3) mapServerDataAccess;
    String mapName = ms.getDefaultMapName();
    int layerId = . . .;//integer id of the feature layer you are interested in accessing
    FeatureClass fc = new FeatureClass(mapServerDataAccess.getDataSource(mapName, layerId));
    
12/18/2014