How to use
See How to use ArcGIS samples for help on running the sample.
- 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.
- 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.
- Import the "findnearbyfeaturessoapsoe" Eclipse project from $AGSDEVKITJAVA/java/samples/arcobjects/serverobjectextensions.
- Navigate to src/arcgissamples/soe/soapclient package and ensure that the JavaFindNearbyFeaturesSOAPClient client application is present.
- 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.
- 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.jar, $AGSSERVER/framework/lib/shared/jaxb-impl-2.1.jar, $AGSSERVER/framework/lib/shared/jaxb-api-2.1.jar, $AGSSERVER/framework/lib/shared/commons-logging-1.1.1.jar, $AGSSERVER/framework/lib/shared/activation-1.1.jar, $AGSSERVER/framework/lib/shared/commons-codec-1.3.jar, and commons-httpclient-3.0.1.jar (download from Apache's website or this sample's lib folder). The above jars are required for compilation and execution of SOAP client applications. The $AGSSERVER 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.
- Open the soapclient/JavaFindNearbyFeaturesSOAPClient.java file and provide appropriate value to the serverName and serviceName variables.
- Provide appropriate coordinates for the PointN object that’s supplied to the findNearbyFeatures() method.
- Execute the soapclient/JavaFindNearbyFeaturesSOAPClient Java app. Remember to provide values to server name and map service name as program arguments before executing the app.
- 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.
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/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|