How to use
See How to use ArcGIS samples for help on running the sample.
- Deploy the lib/JavaSimpleRESTSOEWithProperties.soe file to Server. For instructions on how to deploy an SOE to ArcGIS 10.1 Server, please see the "Developing Extensions" -> "Server Object Extensions" -> "Deploying and Un-deploying SOEs" topic in the ArcGIS Java Developer Help.
- Enable the SOE on map service of your choice. For instructions on how to enable SOE on a map service, please see the "Developing Extensions" -> "Server Object Extensions" -> "Enabling and Disabling SOEs" topic in the ArcGIS Java Developer Help. Please ensure that the map service has at least 1 feature layer and 1 raster layer.
- After the map service has started with SOE enabled on it, open up Services Directory and access the http://<server name>:6080/arcgis/rest/services page
- Click the map service you enabled your SOE on.
- Scroll down and click JavaSimpleRESTSOEWithProperties listed in "Supported Extensions" section
- The JavaSimpleRESTSOEWithProperties web page displays the root resource details such as name and description, along with the "Child Resources" and "Supported Operations" sections.
- Click “layers” subresource. It displays information about all features layers in JSON format.
- Click "properties" subresource. It displays all properties and their values.
- Modify value of the layerType property so that the "layers" subresource returns only raster layers. Log in to ArcGIS Manager and edit the map service you enabled the SOE on. On the map service's editing page, click Capabilities and then click "Java Simple REST SOE With Properties". A section called "Properties" will appear below the SOE.
- Ensure that this section includes user interface similar to the screen shot below. This is a custom property page created for ArcGIS Manager.
- Modify other property values and click Save and Restart.
- Access the "layers" subresource and verify that only raster layers are being returned.
- Access the "properties" subresource and verify the recently modified properties are displayed.
- Deploy the Java Swing Property Page to ArcGIS Desktop. Copy the lib/JavaSimpleRESTSOEPropertyPage.jar to <ArcGIS Desktop Home>/java/lib/ext folder and start ArcMap.
- Connect to your ArcGIS Server in the ArcCatalog window of ArcMap. Open service properties of this map service you enabled SOE on.
- Click on the JavaSimpleRESTSOEWithProperties extension. The "layerType" and other properties will be displayed in a Java Swing dialog in the Map Service Editor.
- Modify this property value by choosing one of the layer types. Click OK.
- After the service has restarted, check the layers subresource. It will display layers on the type you chose in ArcMap's Map Service Editor dialog.
If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.
|soe/JavaSimpleRESTSOEWithProperties.java||The REST SOE Java Server Object Extension class.|
|soe/pp/JavaSimpleRESTSOEWithPropertiesPropPage.java||The property page class|
|soe/pp/PropertyPageUI.java||Class supporting the property page class|
|lib/JavaSimpleRESTSOEWithProperties.soe||The .soe file that contains this Server Object Extension|
|lib/JavaSimpleRESTSOEPropertyPage.jar||The jar file containing a property page for ArcMap.|
|Resources/arcgissamples/soe/JavaSimpleRESTSOEWithProperties/Config.js||The Dojo widget that defines custom property page for ArcGIS Manager.|
|Resources/arcgissamples/soe/JavaSimpleRESTSOEWithProperties/templates/JavaSimpleRESTSOEWithProperties.html||The html file that declares dojo/html user interface elements.|
|Development licensing||Deployment licensing|