This document is archived and information here might be outdated.  Recommended version.


Walkthrough: Creating a REST server object extension (ArcObjects .NET 10.4 SDK)

Creating a REST server object extension


Click here to get the sample associated with this walkthrough.

About the REST SOE walkthrough

This walkthrough takes you through the process of developing a server object extension (SOE) as a Representational State Transfer (REST) Web service. The advantage of using a REST Web service is that it allows your SOE to be consumed by ArcGIS application programming interfaces (APIs) for JavaScript, Flex, Silverlight, and other platforms.
This walkthrough consists of the following associated topics:
This walkthrough also has the following associated sample, which contains all the completed files that you would get by working through the walkthrough:
In the different parts of the walkthrough, you’ll learn how to develop the SOE, deploy the SOE to ArcGIS for Server, and build a JavaScript client that can use the SOE. The walkthrough describes the sample Spatial Query REST SOE, which you can download in its completed format in this software development kit (SDK).
For simplicity, this SOE does only one operation, called Spatial Query. The Spatial Query operation summarizes the area of polygons falling within a buffer distance of a given point. Before the SOE can even be used, the server administrator needs to define which layer in the map service will be summarized, and the field on which the summary should be based. The sample shows how these two properties could be exposed to the server administrator through Manager.
In this example, vegetation polygons in the "veg" layer are summarized by vegetation type stored in a "PRIMARY_" field. The following occurs when the Spatial Query operation of the SOE on this layer is invoked:
  • The input point is buffered.
  • The vegetation polygons intersecting the buffer are clipped to the buffer area.
  • The area of the vegetation polygons is added for each type of vegetation intersected.
  • The SOE returns the clipped polygon boundaries and a summary of the areas for each vegetation type.
The SOE is invoked by sending the uniform resource locator (URL) to the SOE with an appended list of parameters. The response comes back as JavaScript object notation (JSON), which can then be read and drawn by a Web browser. The walkthrough explains how a Web application built with the ArcGIS API for JavaScript could read the JSON returned by this SOE.


See Also:

How to develop the REST SOE
How to deploy the REST SOE
How to develop a property page for the REST SOE
How to enable and test the REST SOE on a service
How to use the REST SOE in a Web application
Sample: Spatial Query REST SOE