Quantcast
Viewing latest article 8
Browse Latest Browse All 9

Migrating to Web Service enabled Java Web ADF: Part 1

The Java Web ADF internally manages how applications connect to the Server Object Manager and communicate to ArcGIS Server services.  Local connections are established using ArcObjects and Internet connections are established using native Java Objects through web service endpoints via the ArcGIS Java Web Service (AgsJWS) API.  This feature of the framework becomes increasingly important with the growing technology trend of using web services and is simple to migrate existing applications from local connections to internet connections. 

These instructions assume you have set up your Eclipse Web ADF project with the JSF 1.2 Facet.  For details on setting this up please refer to the following ArcGIS Java Technology blog post

  1. Open faces-config.xml in Eclipse Faces Config Visual Editor and Select the Managed Bean tab.
  2. Under Managed Bean Elements, select ags1.
  3. Image may be NSFW.
    Clik here to view.

  4. This populates the Managed Bean section, under Managed Bean Class press the Browse button.
  5. Image may be NSFW.
    Clik here to view.

  6. Type AgsMapResource in the Select Entries text box and click OK
  7. Image may be NSFW.
    Clik here to view.

  8. Under Initialization delete the following managed-property settings using the Remove button:
    1. user
    2. serverObjectName
    3. hosts
  9. Replace with the following managed-property settings using the Add button filling in the appropriate values in brackets for your service :
    1. endPointURL – http://[SERVERURL][PORT]/arcgis/services/[FOLDER]/[SERVICE-NAME]/MapServer

    Image may be NSFW.
    Clik here to view.

  10. Your managed bean properties should resemble the following settings with values for your connection.
  11. Image may be NSFW.
    Clik here to view.

  12. Now you can run your application and all Web ADF objects will use the AgsJWS API instead of ArcObjects.  

Finally, you can remove the arcobjects jar file from your application as you are know longer making use of it and doing so will significantly reduce your application footprint.   For more information about Java Web ADF library dependencies read our previous post

Risks

This process will work on any Java Web ADF Application which does not use the Editing Task or have any custom features using ArcObjects.  If you are making use of custom ArcObjects in your Java Web ADF application you will need to migrate your custom features as a Server Object Extension (SOE) and expose it through SOAP, then replace your custom code with connection to your SOE making use of the client web service stubs provided by your SOE.  Part 2 of this post will go into deeper detail of this pattern. 


Viewing latest article 8
Browse Latest Browse All 9

Trending Articles