How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Using this sample
- Deploy the NetSimpleRESTSOEWithProperties.soe file to the server.
- Enable the SOE on a map service of your choice. Ensure that the map service has at least one feature layer and one raster layer.
- After the map service has started with the SOE enabled on it, open the Services Directory and access the http://<server name>:6080/arcgis/rest/services page.
- Click the map service on which you enabled your SOE.
- Scroll down and click NetSimpleRESTSOEWithProperties listed in the Supported Extensions section. If your REST SOE isn't listed here, log in to the Services Directory as an administrator and clear the REST cache. Repeat steps 3, 4, and 5 as needed.
- The NetSimpleRESTSOEWithProperties web page displays the root resource details, such as name and description, along with the Child Resources and Supported Operations sections.
- Click the layers subresource. It displays information about all the features layers in JSON format.
Modify property values on the custom property page for ArcGIS Manager
- Modify the value of the layerType property so that the layers subresource returns only raster layers. Log in to ArcGIS Server Manager and edit the map service on which you enabled the SOE. On the map service's editing page, click Capabilities, then click Simple REST SOE With Properties. A section called Properties will appear below the SOE. This is a custom property page created for Manager.
- Modify other property values as necessary and click Save and Restart.
- Access the layers subresource and verify that only raster layers are being returned.
Modify property values on the custom property page for ArcMap
- Copy NetSimpleRESTSOEWithProperties.Cat.dll to C:\Temp.
- Open the command line window. Navigate to the \Program Files (x86)\Common Files\ArcGIS\bin folder and type ESRIRegAsm.exe C:\Temp\NetSimpleRESTSOEWithProperties.Cat.dll /p:Desktop. Wait for confirmation of successful registration.
- Connect to your ArcGIS server in the ArcCatalog window of ArcMap. Open the service properties of the map service on which you enabled the SOE.
- Click the ".NET Simple REST SOE With Properties" extension. The layerType and other properties will be displayed in a properties dialog box in the Service Editor.
- Modify this property value by choosing one of the layer types, then click OK.
- After the service has restarted, check the layers subresource. It will display layers of the type you chose in the Service Editor dialog box in ArcMap.
- When your test is done, open the command line window again. Navigate to the \Program Files (x86)\Common Files\ArcGIS\bin folder and type ESRIRegAsm.exe /u C:\Temp\NetSimpleRESTSOEWithProperties.Cat.dll /p:Desktop. Wait for confirmation of successful unregistration.
NetSimpleRESTSOEWithProperties\NetSimpleRESTSOEWithProperties.cs | Core SOE implementation for the REST web service |
NetSimpleRESTSOEWithProperties\CustomLayerInfo.cs | Custom layer type that describes feature layers in a map service host |
SimpleRESTSOEWithProperties\bin\Debug\NetSimpleRESTSOEWithProperties.soe | The deployable SOE file |
NetSimpleRESTSOEWithProperties.Cat\bin\Debug\NetSimpleRESTSOEWithProperties.Cat.dll | Binary of custom property page in ArcMap |
Download the files for all languages