PROBLEM

Server object extension (SOE) default properties are not applied

Last Published: January 4, 2021

Description

Server object extension (SOE) default properties are not applied to a service at the time that the SOE is enabled.

Note:
This article pertains to ArcGIS Server version 10.0 and prior. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.

Cause

Server object extensions (SOEs) optionally expose properties set by the server administrator at the time that the SOE is enabled on a service. SOE properties allow some flexibility in the way that an SOE is deployed across different services of the same type. For example, the SOE exposes a property that determines which layer in a map the SOE uses for its analysis. This could vary across services, so it is exposed as a property.

SOE properties are intended to be set through custom property pages written for ArcCatalog or Manager by the SOE developer. If no property page is developed, or if the server administrator publishes the service with the 'Publish a GIS resource' wizard (which does not show the property pages), then the default properties are not set on the SOE. This causes the SOE not to function properly.

SOE developers handle the case where a value for the property cannot be found. This is done by setting a default value directly within the SOE code inside of a catch block.

Solution or Workaround

If the SOE developer creates an ArcCatalog or Manager property page for the SOE, the server administrator then uses the 'Add new service' wizard to enable the SOE on the service. The 'Add new service' wizard shows the property page and allows the server administrator to apply valid property values. Alternatively, the server administrator opens the Service Properties dialog box after creating the service and accesses the SOE property page through the Capabilities tab.

If no property page is necessary, code must be included within the SOE to handle the case where the property is not set. This is accomplished within in the SOE Construct method, as in the following example. In this example, a property called MarkerLimit is set to default to a value of 500 if no property is found in the service configuration file (example is in C#):

Code:
public void Construct(IPropertySet props)
        {
            configProps = props;

            try
            {
                string markerLimitString = props.GetProperty("MarkerLimit") as string;
                m_markerLimit = Convert.ToInt32(markerLimitString);
            }
            catch
            {
                logger.LogMessage(ServerLogger.msgType.warning, "Construct", 8000, "SOE custom error: No value or invalid value provided for MarkerLimit. Defaulting to a limit of 500.");
                m_markerLimit = 500;  // Default if property can't be read
            }

        }

Article ID:000011304

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic