How to use
See How to use ArcGIS samples for help on running the sample.
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/mxds/portland.mxd and <Your ArcGIS Developer Kit Install directory>/Samples/data/portland/portland.gdb.
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.
POI Finder REST SOE Schema
- Figure 1 below shows structure of POIFinder SOE, i.e. its operations and sub resources.
- If you follow instructions in this document to deploy POIFinder SOE to ArcGIS Server, the root URL of the SOE a REST resource would be http://<serverName>:8399/arcgis/rest/services/portland, with "portland" being the map service name.
- URLs in Figure 1 below are relative to the above root URL. For example, the final URL for the root resource would be http://<serverName>:8399/arcgis/rest/services/portland/MapServer/exts/POIFinderSOE.
How to deploy POIFinder SOE to ArcGIS Server?
- Copy the POIFinder_RESTExt.jar file that holds this SOE, from the $AGSDEVKITJAVA/java/samples/arcobjects/serverobjectextensions/poifinder_rest/lib folder to $AGSSERVERJAVA/java/lib/ext folder.
- Alternatively, if you open this sample's Eclipse project in Eclipse IDE, you can export the POIFinderSOE.java file to a jar file and save the jar file to the $AGSSERVERJAVA/java/lib/ext folder.
- Log into ArcGIS Manager. Navigate to "Manager Extensions" page in "GIS Server" section.
- Refresh this page. If the jar file containing POIFinder SOE does exist in $AGSSERVERJAVA/java/lib/ext folder, then ArcGIS Manager will display a record for this SOE on this page.
- Click on "Register" link next to the POIFinder SOE.
- The POIFinder SOE is now registered as extension to all Map Services.
How to enable POIFinder SOE with particular instance of Map service?
- Publish a map document as map service using ArcGIS Manager or ArcCatalog's "Publish GIS Resource" or "Add New Service" wizards.
- Create the map service using the "portland" map document from $AGSDEVKITJAVA/java/samples/data/mxds folder. The POIFinder SOE sample is designed to extend a map service that’s based on this portland map document only. We'll call this map service "portland".
- On the "Capabilities" page of "Publish GIS Resource" or "Add New Service" wizards, select the capability that matches with POIFinder SOE. Ensure that the check box next to the capability is checked. If there is no capability that matches with "POIFinder", please check if previous SOE deployment and registration step was executed correctly.
- If the SOE has capabilities of its own, please select the appropriate ones.
- Complete the publishing process and restart map service if necessary.
- Ensure that map service shows POIFinder SOE as a capability after it is started, in ArcCatalog or ArcGIS Manager.
How to access POIFinder REST resource?
- Open Services Directory web application (at http://<your server name>:8399/arcgis/rest/services/portland/MapServer).
- Scroll down the web page to "Supported Extensions:" section and click "POIFinderSOE" extension. The POIFinderSOE web page displays the POIFinder SOE's name, description, gas station and restaurant collections, and links to the SOE's operations.
- Scroll down to the "Supported Interfaces:" section. Click "REST". This displays info about the resource in json format.
- Navigate back to "POIFinderSOE" web page.
- Click "Schema". The "Schema" page displays this resource's schema, i.e. its sub-resources, operations, parameters of each operation and supported output formats.
How to consume POIFinder REST resource's operations?
- Navigate back to "POIFinderSOE" web page.
- Scroll down to the "Supported Operations: " section on the "POIFinder" page,
- Click the "findGasStationByName" link.
- Enter value for gas station name. This operation also accepts partial name of gas station as input. Type in "Shel" to find Shell gas stations or "Elev" for 7-Eleven gas stations.
- Select output format.
- Click on "findGasStationByName(GET)" or "findGasStationByName(POST)" button. All gas stations that have names partially matching with your input will be displayed.
- Navigate back to "POIFinderSOE" web page.
- Click the "findRestaurantByName" link.
- Enter value for restaurant name. This operation also accepts partial name of a restaurant as input. Type in "Thai" to find restaurants that include this text it their name.
- Select output format.
- Click on "findRestaurantByName(GET)" or "findRestaurantByName(POST)" button. All restaurants that have names partially matching with your input will be displayed.
How to consume POIFinder resource's sub-resources?
- Navigate back to "POIFinderSOE" page.
- Scroll down to the "Gas Stations: " section.
- Click one of the gas stations listed here or type in http://<serverName>:8399/arcgis/rest/services/portland/MapServer/exts/POIFinderSOE/GasStations/3 to access gas station with id 3. Try accessing gas stations with different ids.
- Navigate back to "POIFinderSOE" page.
- Scroll down to the "Restaurants: " section.
- Click one of the restaurants listed here or type in http://<serverName>:8399/arcgis/rest/services/portland/MapServer/exts/POIFinderSOE/Restaurants/5 to access restaurant with id 5. Try accessing restaurants with different ids.
How to disable POIFinder SOE with "portland" Map service?
- Use ArcGIS Manager or ArcCatalog to access "portland" map service's properties.
- On "Capabilities" page, uncheck the check box next to POIFinderSOE Capability.
- Save the map service and restart it if necessary.
- The POIFinder SOE is now disabled on the "portland" map service.
How to un-deploy POIFinder SOE?
- Log into ArcGIS Manager. Navigate to "Manager Extensions" page in "GIS Server" section.
- Click "UnRegister" link next to POIFinderSOE.
- The POIFinder SOE is now unregistered from ArcGIS Server.
- Remove the SOE's jar file from $AGSSERVERJAVA/java/lib/ext folder.
Download the files for Java
soe/POIFinderSOE.java | The POI Finder Java Server Object Extension class. |
Development licensing | Deployment licensing |
---|---|
Server | Server |