Find Nearby Features SOAP Server Object Extension


Purpose
The purpose of this sample is to demonstrate use of a SOAP based Server Object Extension that exposes a SOAP operation which supports use of different data types, including ArcObject types.
The single operation is called "findNearbyFeatures" and takes in a layer Id, a location (x, y coordinates and spatial reference) and the distance to indicate how wide a net should be cast, and returns a list of all features within that distance.

How to use

See How to use ArcGIS samples for help on 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.

How to use this sample?
  1. Deploy the lib/JavaFindNearbyFeaturesSOAPSOE.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.
  2. 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. Please ensure that the map service has at least 1 feature layer.
  3. Import the "findnearbyfeaturessoapsoe" Eclipse project from $AGSDEVKITJAVA/java/samples/arcobjects/serverobjectextensions.
  4. Navigate to src/arcgissamples/soe/soapclient package and ensure that the JavaFindNearbyFeaturesSOAPClient client application is present.
  5. Verify that lib/JavaFindNearbyFeaturesSOAPSOE_stubs.jar is present in the project's build path. This jar carries stubs for SOAP SOE's client application. This jar resides in the $AGSDEVKITJAVA/java/samples/arcobjects/serverobjectextensions/findnearbyfeaturessoapsoe/lib folder.
  6. Ensure that the following jar files are also present in the project's build path: $AGSSERVER/framework/lib/shared_arcgis/arcgis_agsws_stubs.jar, $AGSSERVER/framework/lib/shared_arcgis/arcgis_ws_runtime.jar, $AGSSERVER/framework/lib/shared/jsr173_1.0_api.jar, $AGSSERVER/framework/lib/shared/jaxb-impl.jar, $AGSSERVER/framework/lib/shared/jaxb-api.jar, $AGSSERVER/framework/lib/shared/commons-logging-1.0.4.jar, $AGSSERVER/framework/lib/shared/activation.jar, $AGSSERVER/framework/lib/shared/commons-codec-1.3.jar, and $AGSSERVER/framework/lib/shared/commons-httpclient-3.0.1.jar. The above jars are required for compilation and execution of SOAP client applications. The $AGSSERVERJAVA environment variable points to the directory ArcGIS Server 10.1 is installed in. If ArcGIS Server 10.1 is not installed locally, copy over these jars from a computer that has ArcGIS Server 10.1 installed.
  7. Open the soapclient/JavaFindNearbyFeaturesSOAPClient.java file and provide appropriate value to the serverName and serviceName variables.
  8. Provide appropriate coordinates for the PointN object that’s supplied to the findNearbyFeatures() method.
  9. Execute the soapclient/JavaFindNearbyFeaturesSOAPClient Java app. Remember to provide values to server name and map service name as program arguments before executing the app.
  10. Check the output messages of the application. This application instantiates the stub class using SOE's HTTP URL and makes a call to those methods that are exposed as operations in the WSDL.


Download the files for Java
soe/JavaFindNearbyFeaturesSOAPSOE.java The FindNearbyFeatures Java Server Object Extension class.
soe/IJavaFindNearbyFeatures.java A custom interface that exposes the SOE's SOAP callable methods. The above SOE implements these method.
soe/soapclient/JavaFindNearbyFeaturesSOAPClient.java A client console application that consumes the SOE's web service through Internet connection.
lib/JavaFindNearbyFeaturesSOAPSOE_stubs.jar A jar file that contains client side proxies to generate and send SOAP requests to this SOE.
lib/JavaFindNearbyFeaturesSOAPSOE.soe The .soe file that contains this Server Object Extension
res/JavaFindNearbyFeaturesSOAPSOE.wsdl The SOAP SOE's WSDL file




Development licensing Deployment licensing
Server Server