In this topic
- Deployment workflow
- Support for Custom Property Pages for ArcGIS Manager
- Support for default collections in REST SOEs
At ArcGIS 10.1, the following features were introduced in server object extensions (SOEs):
Deployment workflow
At ArcGIS 10.0, the unit of deployment for Java SOEs was a JAR file. For .NET and C++ SOEs, the deployment units were DLL files. This difference in deployment units required users to use different workflows and tools for registering SOEs as extensions to map services. ArcGIS 10.1 introduces a common deployment unit, called the .soe file. A .soe file is a container that is programming language agnostic. In other words, it holds SOEs written in Java, .NET, and C++. The use of a uniform container to hold SOEs has allowed for a simple and user-friendly deployment experience via ArcGIS Server Manager at version 10.1.
See the Deploying and Un-deploying SOEs topic to learn about the new deployment experience. For more details on how to export an SOE to a .soe file, consult the developer topics for the programming language of your choice. For Java developers, the Developing REST SOEs and Developing SOAP SOEs topics discuss the new Eclipse wizard that facilitates export of Java SOEs.
Support for Custom Property Pages for ArcGIS Manager
Properties allow a server administrator to define how the SOE will behave when deployed on his or her ArcGIS Server site. Such properties could be modified using ArcGIS Server Manager or the Service Editor Dialog box in ArcGIS for Desktop. The default behavior of ArcGIS Server Manager is to display text boxes for editing properties. At ArcGIS 10.1, Manager can display advanced user-defined UI controls to edit the properties of SOEs. Such controls must be developed using the Dojo JavaScript library, then exported to a .soe file.
Support for default collections in REST SOEs
In REST SOEs, a subresource can be a tagged as “collection”. This gives you access to individual elements of a collection of objects via the URL pattern /<collection name>/<collection id> and also facilitates defining/implementing operations for a collection of objects. The operations, in such cases, do not target the whole collection, but individual elements of the collection. For example, for a map service that is accessed via Services Directory, the “Layers” subresource is a collection, and individual layers are elements of this collection. The Query operation is defined on the Layers collection subresource but acts on individual elements of the Layers subresource.
ArcGIS 10.1 for Server introduces the concept of default collections, which allows you to tag a subresource as the “default collection”. The difference between a collection and a default collection is that elements in a default collection can be accessed without naming the collection. Going back to the map service example, “Layers” is now a default collection at ArcGIS 10.1 for Server, and individual layers in a map service can be accessed via the /MapServer/<layer id> URL, as opposed to the /MapServer/layers/<layer id> URL at ArcGIS 10.0.
A subresource in an SOE can also be tagged as the default collection. During SOE creation using the Eclipse IDE wizard, checking the “Make this a default collection” check box (highlighted in red below) for a subresource will tag it a default collection. Please note that if you have tagged several subresources as collection, you must tag only one of them as the default.

How to use MIME types in REST SOE response?
The ArcGIS REST framework allows Server Object Extensions to return responses with MIME type other than "application/json". This can be easily accomplished using the responseProperties parameter to the IRestRequestHandler.handleRESTRequest() method.
publicbyte[] handleRESTRequest(String capabilities, String resourceName,
String operationName, String operationInput, String outputFormat,
String requestProperties, String[] responseProperties)
This parameter is an array of strings and the ArcGIS REST framework expects the first element of this array to contain information about the response's content type and content disposition (optional), in JSON format. The following is an example of properties of a response that returns the "application/xml" MIME type in JSON format.
[Java]
{
"Content-Disposition": "inline;filename=\"myXmlFile.xml\"", "Content-Type":
"application/xml"
}
The above properties in JSON format must then be converted to string and added as first element to the responseProperties array. This will ensure that HTTP response headers will include the right content type after response is received by the client.
How to access user information in SOEs?
At ArcGIS 10.1, the object that contains information about users that are logged into ArcGIS Server is accessible via the ServerUtilities.getServerUserInfo() utility method. This object can then be used to access user name and roles that the user is part of. The following example accesses user name and prepares a list of roles that the user is part of.
IServerUserInfo userInfo = ServerUtilities.getServerUserInfo();
if (userInfo != null){
String userName = userInfo.getName();
IEnumBSTR roles = userInfo.getRoles();
String role = roles.next();
while (role != null){
role = ", " + roles.next();
}
}
Development licensing | Deployment licensing |
---|---|
Server | Server |