Tag: Web ADF

Today and Tomorrow: A State of the Union Address to the Esri Java Community

Here we are already. It is already the middle of June, 2011. Another Esri User Conference is shimmering on the horizon again. ArcGIS 10 is making history and making a significant impact in and around the world, and yet at the same time, the buzz can already be heard surrounding prospects of a major, revolutionary release of the next ArcGIS System not so far down the road. Exciting times indeed!

So it seems as though it’s about time to pause now and take a realistic overview of where Esri’s Java Platform strategy is today and where it is trending. The intention of this post is to update you all, certainly. I would add, too, that an equally important goal of this post is to give confidence to you that Esri is committed to supporting your business needs with respect to the entire Java platform, from mobile to desktops to enterprise.

It’s been a while since we’ve collectively reviewed this Java state of the Union, so to speak. Let me clarify what I mean by “we”; I mean “you”, the Java users and developers as well as those of us at Esri that work to serve “you”. Together, I mean “us”. A community. I know, it sounds a bit “touchy-feely”, as Americans would say. I do mean that with all sincerity, but I’ll move on to the matter at hand.

Java continues to be an important platform for Esri’s GIS solutions and offerings going forward through versions 10.x and beyond.

Java also continues to be the world’s most widely used platform for building real, robust and secure enterprise systems. Industries such as finance, insurance, health care, government, national defense, all rely on the Java platform because of its proven reliability and versatility on many runtime platforms over the years. Esri recognizes the pervasiveness of Java throughout these industries where GIS is also critical.

Let’s take a closer look at how Esri is supporting the Java developer and user community today as well as what Esri’s plans are for the foreseeable future.

ArcGIS for Server

Typically, one thinks of Server as mapping to Java Enterprise Edition (Java EE); Web Services, Web Applications, and the various Java technologies surrounding these platforms. Historically, the showcase product here from Esri has been the Java Web ADF. This is a true JSF/MVC implementation for rapidly building GIS Web applications that consume services from ArcGIS Server and OGC standard servers.

With the WebADF, developers find a clearly defined Model/View/Controller (MVC) implementation, and the framework adheres to tried and true Java EE standards, i.e JSF, AJAX, SOAP/XML, and more. It is a beautiful stack, actually. The Java enterprise architect gets it. However, the pure GIS professional developer who is not familiar with these Java EE standards struggles with it. Is it finished and perfect? No. Is it successful, yes it is, or was, in many areas. In other spheres, though, it was quite complex. Users and developers found it difficult to scale and maintain, in the end.

At version 10.0 of ArcGIS, the Java Web ADF has been deprecated; the 10.1 version of ArcGIS will be the last release of the Web ADFs, both Java and .NET.  Folks that are planning new projects having to do with ArcGIS Server are highly advised to eliminate the Web ADF from consideration.

With respect to the “View” section of the MVC model, Esri has been heavily investing in the promotion of the RESTful ArcGIS Web APIs. Javascript (dojo/AJAX), Flex, Silverlight are all very productive platforms, and we have seen a great deal of uptake and success in the past 2 years within GIS developer communities. These are simple APIs and easy to develop with, which has translated to quicker-time-to-market for a lot of Esri customers and business partners.

Of course, the foundation for these APIs is REST. The ArcGIS REST API handlers define the basis of the “Controller” tier, if you will. The Model is core ArcGIS Server. This is key to Esri’s strong Services platform for Enterprise GIS. The ArcGIS REST API is a public specification, and is published as the open Geoservices API.

While the ADF has been deprecated, as previously mentioned, the ArcGIS Java Web Services API (AgsJWS), the underpinning API for the WebADF, has not.  This is an important point to make. SOAP/XML is till the Web Services standard for SOA integration. Esri does not plan to deprecate this Web Services solution for ArcGIS Server. The AgsJWS is a pure Java Web Services API, based on JAXB, and is an excellent solution for building , connecting and integrating great geospatial analysis and visualization in your Java EE based solutions. Esri continues to cultivate and support its community today and into the future.

For the back-end Server, building Server Object Extensions (SOEs) with the ArcObjects SDK for Java has been and continues to be the leading solution for creating custom ArcGIS Server Web Services. There have been compelling success stories from users who to extend the Server with Java APIs, using the powerful Eclipse tooling to build and deploy them. A good example of a success story is ArcGIS for INSPIRE, a product that heavily relies on Java-based SOEs. SOEs can be exposed instantly as REST and SOAP, so if you develop with any of the RESTful Web APIs a front end to your system, your custom Java implementation and capabilities in the Server can immediately be realized in the View tier of MVC.

ArcGIS for the Desktop

ArcGIS Desktop is extensible using Java. Java developers can use the ArcObjects Java SDK Eclipse plug-ins to write, debug and extend ArcObjects and the Geoprocessing framework, and deploy their add-ins and extensions as jar files. ArcGIS Desktop is Java-enabled! ArcGIS Desktop ships with its own Java runtime. 5 or 6 years ago, could anyone have imagined that this would become possible? This came about in response to a lot of Java developers wanting to customize ArcGIS Desktop, ArcMap and ArcCatalog, using their chosen skill and expertise, and Esri listened and responded. The ArcObjects SDK for the Java platform continues to be the go-to developer kit for building custom, feature-rich desktop applications that leverage the powerful ArcGIS Engine runtime.

ArcGIS for Lightweight and Mobile Devices

At version 10.1 of ArcGIS, Esri will introduce a new suite of products under the platform strategy called “Lightweight GIS”. GIS is accessible and usable via mobile devices such as laptops, tablets and phones in connected, disconnected, and “sometimes”-connected environments. This lightweight GIS platform provides new developer APIs for Java desktop, mobile, and embedded device developers. There are two key products based on this platform that Java developers can take advantage of: The ArcGIS Runtime SDK for Java SE based GIS applications, and the ArcGIS for Android SDK for Android phones and tablets. These SDKs are founded upon the Web API and Smartphone API object models. They are pure Java APIs and both have strong Eclipse IDE
integration support, making development easy, quick and extremely intuitive.

Version Support

ArcGIS versions 10 and 10.1 both support Java SE 6 and Java EE 5. Esri continues to monitor the progress of the Java EE 6 and Java SE 7 specifications to see if the features they offer will make sense for the ArcGIS product line.


To summarize, Esri’s ArcGIS and Java strategy is pervasive, in and through all of the key computing environments that Java is found in, from Mobility to the desktop and to the Enterprise. This makes Esri’s GIS and Java a perfect match for any Java-based implementation that requires the delivery of geospatial or location services and capabilities.

So until next time, please let us know your thoughts and feedback by sharing comments questions. This will help us in serving you better, the Java developer and user community. We hope to meet with you at the ESRI International User Conference in July!

Posted in Developer | Tagged , , , , , , , , , , | 2 Comments

Java Web ADF Dependent Libraries

The ArcGIS Server Java Web ADF follows the Model-View-Controller (MVC) architecture pattern which isolates application logic from the user interface and allows for independent development and maintenance of loosely coupled components. 

Web ADF Components
The Web ADF components are located on disk under ‘<ARCGISHOME>/java/web/webcontrols’ and include all of the native and interop libraries as well as all the core javascript and jsf functionalities.
Web ADF libraries are located under ‘<ARCGISHOME>/java/web/webcontrols/WEB-INF/lib’ and include the following:

  • Web ADF native libraries
    • arcgis_webcontrols.jar
    • arcgis_webcontrols_ags.jar
    • arcgis_webcontrols_arcims.jar
    • arcgis_webcontrols_arcweb.jar
    • arcgis_webcontrols_ejb.jar
    • arcgis_webcontrols_wms.jar
  • ArcObjects Java interop libraries
    • arcobjects.jar
  • Web ADF JSF libraries
    • arcgis_webcontrols.jar
  • Enterprise ADF libraries
    • arcgis_ejb.jar
    • arcgis_ejb_stubs.jar
    • arcgis_jca.jar
  • ArcGIS Web Services
    • arcgis_agsws_stubs.jar
    • arcgis_ws_runtime.jar
  • ArcGIS Security
    • arcgis_securityapi.jar
    • arcgis_securityutil.jar
  • ArcGIS Web Map Service (WMS) Client
    • arcgis_wmsclient.jar
    • arcgis_wmsclient_impl.jar

Required ADF Components

When creating custom Web ADF applications you can break the libraries into three tiers and include only the libraries required for your application. 

Library reference tiers:

   1. Core
   2. Resource
   3. Business Logic

The Core library reference for the Web ADF is arcgis_webcontrols.jar.  This library will be used by all your Web ADF applications regardless of which resource or required server references are required.

The Resource library reference refers to the type of resource your application will connect to.  The Web ADF supports many types of resource connections, including custom resources.  Below is a list of some out of the box resources and their required library references:

   1. ArcGIS Server: arcgis_webcontrols_ags.jar
   2. ArcIMS: arcgis_webcontrols_arcims.jar
   3. OGC/WMS: arcgis_webcontrols_wms.jar

The Business logic library reference refers to the controlling logic provided by the resource you are connecting to.  Below is a list of some out of the box resources and their respective business logic libraries:

   1. ArcGIS Server: arcobjects.jar (local connection) & arcgis_agsws_stubs.jar (remote connection through web services)
   2. ArcIMS: arcims_jconnect.jar
   3. OGC/WMS: arcgis_wmsclient.jar & arcgis_wmsclient_impl.jar

Let’s consider an example application that makes exclusive use of an ArcGIS Server local connection resource and determine which libraries are required in each tier.

   1. Core: arcgis_webcontrols.jar
   2. Resource: arcgis_webcontrols_ags.jar
   3. Business logic: arcobjects.jar

You only need to include the necessary libraries to connect to the resource your application uses and the business logic library required by the resource.  You do not need to include the libraries for other resources or their respective business logic libraries.  Making efficient use of the Web ADF dependent libraries will help
ensure your application is optimized with the required library

Posted in Developer | Tagged , , , , | Leave a comment

Using Eclipse Faces Config Visual Editor

By default, the ArcGIS Web Project template that come with the ArcGIS Server plug-in for Eclipse IDE extends Eclipse Dynamic Web Project template.  This provides the base for a Web Mapping Application which is a Java Server Faces (JSF) application.  When you open the faces-config.xml file in the Eclipse editor, the source xml file opens up which may be difficult to navigate and edit for some.  The Web Tools Platform (WTP) JSF tools have been provided with Eclipse Java EE bundles since the Ganymede release and to take advantage of the faces-config visual editor in your ArcGIS Web Project you need to do the following in your Eclipse Developer Environment: 

  1. Before you start, rename your projects web.xml (e.g. web_orig.xml) as this process will create a new web.xml file and overwrite the projects web.xml.  The Web ADF ArcGIS Web Project depends on the web.xml file that the Web ADF plug-in creates so we don’t want to overwrite it.  
  2. Right click on your Project and select Properties.
  3. In the Properties dialog select ‘Project Facets’ from the left hand selection and check the ‘JavaServer Faces’ Project Facet.  
  4. Click on the ‘Further configuration required’ link near the bottom of the dialog. 
  5. Accept the ‘Server Supplied JSF Implementation’ in the JSF capabilities dialog and click OK. 
  6. Now click the OK button in the Project Properties dialog.  
  7. Finally, delete the web.xml file that was generated by the JSF Facets dialog and rename your original file you changed in step 1 back to web.xml. 

When you double click on your faces-config.xml file, the Faces Configuration Introduction page should open and you are now ready to use the visual editor capabilities to edit your faces-config file. If this did not happen, simply right click on your faces-config.xml file and select ‘Open With’ to ensure that the ‘Faces Config Editor’ is the default editor.


Once your faces-config file is opened inside the visual editor you will notice different tab options at the bottom of the editor which allows you to visually edit different aspects of the faces-config file.  For example, to edit the Managed Beans in your application, you can click on the ‘ManagedBean’ tab to open the editor, then add/remove beans or select a bean to edit. 


While many of our Eclipse Plug-in tools take care of editing your projects faces-config editor, enabling the visual capabilities on your project simplifies situations when you need to do some manual edits to the file.  



Posted in Developer | Tagged , , , , | Leave a comment

Web Mapping Applications made easy with Eclipse ArcGIS plug-ins

In this post we will discuss how to install and set up the ESRI Java Web ADF plug-in using Eclipse Ganymede. Once, we have the plug-in installed, we will set out to use the features by creating a Web Mapping Application (WMA) and extend our WMA with a Query Task functionality. 

Setting Eclipse ArcGIS Preference

Before beginning any project, it can be useful to set up common preferences for the new project wizards. Click Window > Preferences from the main menu in Eclipse. Select ArcGIS > Server from the left panel of the dialog box. The connection information entered here will be used by the project wizards. You can specify information needed to connect to some of the more commonly used servers such as ArcGIS Server, ArcIMS, and ArcGIS Web services. Each time you are prompted to add a data source, it will be automatically pre-populated with these values. 

You can also check the box to Show New Project Wizard Advanced Options. This will provide a couple of extra steps in the wizard for further customization if needed. By default this is unchecked. 

Setting up an Eclipse Server Runtime with Tomcat

In order to test and publish web applications on your application server through Eclipse, you need to define one or more resources by installing the application server and installing the appropriate server runtime in Eclipse.  Although you can set up any supported application server which supports Eclipse server runtimes, in this example we will publish our WMA to Apache Tomcat.  Once installed, it is also important to make sure that Tomcat is set to use a 1.5.x or higher JDK.  You should check by using the Configure Tomcat shortcut from the Tomcat install to display the properties dialog below. Click the Java tab and make sure the Java Virtual Machine is set to a jvm.dll located in a 1.5.x JDK. 

More information about using Tomcat in Eclipse can be found on the Eclipse wiki.  

To set up Tomcat server runtime in Eclipse, there are a few simple steps:

  • Click Windows > Preferences from the Eclipse toolbar. In the Preferences dialog box, expand the Server option and select Installed Runtimes. Click the Add button.
  • Navigate to the appropriate Apache Tomcat server and click Next.
  • Click the Browse button and locate the Tomcat installation directory on your file system. Click the Installed JREs button to add a JDK as the default JRE.  Check an appropriate JDK or click Add and browse for a JDK. Click OK to close the Preferences dialog box.
  • The dialog box appears as follows. Click Finish. Your Tomcat Server runtime is ready to be used when creating new projects.

Install ArcGIS Server for Java Web ADF plug-in
This section contains instructions on how to install/update the plug-in from ESRI update center.

  • Select Help > Software Updates > from the Eclipse toolbar (1) if you have an ArcGIS Eclipse Plug-in installed and are upgrading.  Click the Installed Software tab, find ArcGIS Core and ArcGIS Server entry, right click on each and choose Update. Eclipse will go to the pre-defined update site to get the latest plug-ins. (2) If this is your first time installing the ArcGIS Server for Java Eclipse plug-in, click the Available Software tab, and click the Add Site button on the right.
  • Next, click the Local button to browse to the plug-in location on disk, make sure to browse to the Server folder level in your ArcGIS Server for Java directory.
  • You should now see ArcGIS added to the available software list. Check ArcGIS Core and ArcGIS Server and click Install. Once installation is complete, click Finish and follow the prompt to restart Eclipse by clicking OK.

Create a new ArcGIS Web ADF project
This section contains instructions for creating a new Eclipse project based on ESRI Web Project Template.

  • Create a new project by clicking File > New > Project and choose ESRI Web Project under ESRI Templates. Click Next and give your project a name.
  • Make sure to choose a Target Runtime, for example, the Apache Tomcat server runtime we set up in previous steps.
  • In the New ArcGIS Web Project Window, double click Add GIS Server node.


  • Enter the server connection credentials and click OK.  This should be pre-populated with the credentials set in the preferences dialog. 


  • Choose a service from the list and add it to the webcontext. Click Finish to complete.
  • Right click the project name in the Project Explorer panel, Run As > Run on Server. Pick a server and hit Finish. To view the site in an external browser, go Window > Web Browser, choose anyone other than the Internal Web Browser.

At this point, you should have a WMA running with all the default features offered by the plug-in.  In our next section, we will add a Query Task to the WMA and test it again.   

Add a query task
This section contains instructions on how to add a query task to the web application.

  • In the right hand project file list, expand your project to open the mapviewer.jsp under WebContent. Once the source opens up, scroll down to the line where it says <a:task id=”searchAttributesTask” . . .> (this is typically around line 123). 
  • Place your cursor in front of this line and right click ArcGIS > Add Task > Query Attributes …


  • Now configure the query task. Click the Settings tab, pick a Map Service and pick a layer. Next to Query Expression, click Add.
  • In the New Expression window, pick a Field to query against and either type in the value to query or select from a list of sample values. Click OK, and OK on the Add Query Task window.
  • Inspect your extended mapviewer.jsp source file.  You should see the query task added and the query link added to the task menu bar.
  • Run the application again and test your query task.

You now have a WMA with an extended Query Task enabled all without writing a single line of code.  The ESRI ArcGIS Server for Java plug-in hides the complexity of many features which enables you as the developer to quickly create production quality web mapping applications. 

Contributing Author, Li Linn, ESRI Java Development Team

Posted in Developer | Tagged , , , | 2 Comments

AgsJWS 9.3.1 Developer Dependencies

The ArcGIS Java WebServices (AgsJWS) libraries are included with the ArcGIS Java Web ADF.  With version 9.3.1, the Web ADF libraries are located under ‘$ARCGISHOME/java/web/webcontrols/WEB-INF/lib’.  The ESRI AgsJWS libaries include the following:

  • arcgis_agsws_stubs.jar
  • arcgis_ws_runtime.jar

The dependency libraries are in the same location on disk and include the following:

  • activation.jar
  • commons-codec-1.3.jar
  • commons-httpclient-3.0.1.jar
  • commons-logging-1.0.4.jar
  • jaxb-api.jar
  • jaxb-impl.jar
  • jsr173_1.0_api.jar

You can create User Libraries in NetBeans and Eclipse to accelerate development with the AgsJWS API. 

NetBeans v6.5.1

  1. From the tools menu, select Libraries to open the Library Manager. 
  2. Click the ‘New Library…’ button to create a new Library and name it ‘AgsJWSv9.3.1′.
  3. Select a Library Type
  4. You should see your library added to the Library Type you selected in the previous step.
  5. With your new ‘AgsJWSv9.3.1′ library selected in the left hand Libraries pane, click the ‘Add JAR/Folder’ button.
  6. Navigate to the ‘$ARCGISHOME/java/web/webcontrols/WEB-INF/lib’ folder location.
  7. Select the ESRI AgsJWS libraries and dependency libraries described above and click ‘Add JAR/Folder’.
  8. Once you have all the libraries selected, click OK to close out of the dialog.  

Now when you can add the library to an existing project by right clicking the project and selecting ‘Properties’.  The Project Properties dialog opens where you can select Libraries from the list of Categories and click the ‘Add Library’ button to find the appropriate library to add. 

Eclipse Ganymede (v3.4.x)

  1. From the Windows menu, select Preferences.
  2. Select Java > Build Path > User Libraries from the left hand pane.
  3. Click the ‘New’ button to create a new Library and name it ‘AgsJWSv9.3.1′.
  4. With your new library selected, click the ‘Add Jars’ button to open the Jar Selection dialog.
  5. Navigate to the ‘$ARCGISHOME/java/web/webcontrols/WEB-INF/lib’ folder location.
  6. Select the ESRI AgsJWS libraries and dependency libraries described above and click ‘Open’.
  7. You should now see all the libraries added with options to attach source and javadoc locations. 

Now you can add the library to a new project or existing project by clicking the ‘Add Library’ in the New Project dialog and/or the Project Preferences dialog respectively.  In Eclipse, your library is added to the ‘User Library’ category by default.  Once you select User Library, you can add the appropriate library to your project. 

For further reference please review the follow Help System topics:

Posted in Developer | Tagged , , , , | 1 Comment

Custom Task to consume SOE

At 9.3.1, we introduced Server Object Extensions (SOE) in Java.  Java SOE’s offer developers an opportunity to encapsulate low level GIS functionality in desktop or web applications.  In the ArcGIS Server Java Development Help System we document two approaches to consuming SOE’s in a console application and in a web application.  In our web application approach, we document using a Java Server Faces (JSF) managed bean pattern where the business logic, SOE, is applied to a command button component in an action listener.  This pattern does not directly depend on the Java Web ADF, but it can be used to extend a Web ADF application.  To take advantage of patterns the Java Web ADF offers, we will take a look at extending the Java Web ADF Task Framework to consume a SOE using the Hello World SOE Developer walkthrough

 The Web ADF Task Framework is an extensible architecture where you can integrate and deploy custom functionality as “Web tasks” within a Web ADF application.  Creating a Custom Java Web ADF Task that consumes an SOE involves the following steps once you have successfully deployed the Hello World SOE:  

  1. Include the SOE jar File in your Web ADF libraries
  2. Create a Java Task Class to consume the SOE
  3. Register the Class as a Managed Bean
  4. Add the task control to the JSP page with a reference to the managed bean

Include SOE Jar File

Copy the HelloWorldSOE jar file into the WEB-INFlib folder of your Web ADF application so that you have local access to the SOE business object in your WEB ADF application. 

Create a Java Class to consume the SOE

To work with our HelloWorld SOE, we will want to create a command, or action, task and send the return to the Results panel.  Commands allow you to execute business logic in your SOE without any user interaction with the map.  To create a Web ADF Task, you can either manually create a Java class file and associated TaskInfo classes or use a supported developer IDE like Eclipse to stub out all your Task Class artifacts.  Once you have your Task Class created, implement the following method: 

  public void getMessage(TaskEvent event) {
    System.out.println(this.getClass().getName() ":getMessage()");
    try {
      // Get a handle to the Local ArcGIS Service
      AGSLocalMapResource resource = (AGSLocalMapResourceevent.getWebContext()
      // Get a handle to the SOE
      IServerObject so = resource.getServerContext().getServerObject();
      IServerObjectExtension soe = ((IServerObjectExtensionManagerso)
      IHelloWorldSOE hwSoe = (IHelloWorldSOE)soe;
      // Invoke the HelloWorld SOE
      String soeReturn = hwSoe.helloWorld();
      // Add attributes to a list to send to WebResults
      List<String> values = new ArrayList<String>();
      String id = "" + System.currentTimeMillis();
      values.add(id)// Unique identifier
      values.add(soeReturn)// SOE Message
      // Add a List of results to the WebResults object
      WebContext context = event.getWebContext();
      WebResults results = context.getWebResults();
      results.addResults"SOE Message",  values );

    catch (Exception e) {

Let’s explain the method code above.  First we need to get a handle to the Map Service which the SOE is enabled on.  In the WebADF, we can get this from the named resource in our faces-config file.  In our case the resource is named ‘ags1′ and we use a Local Connection to cast to.  Once we have the Map Service, we can get access to the associated Server Object and we can gain access to extensions with the method findExtensionbyTypeName( <soename> ).  The return object from this method call can be collected by IServerObjectExtension and this reference can be used to call a method on the SOE. At this point in our simple example, we just want to display the return from our SOE in our application.  We can easily use the WebADF Results Panel to post the return message.  The WebResults object is maintained by the WebContext and can be accessed via the WebContext.getWebResults() method.  The result objects that you add to WebResults can provide up to 4 types of information.  We will use the addResults() method to add a Results Header and the result data supplied as a java.util.List object.  That is all the code required to access our SOE and send the response to the Results Panel.  We take advantage of the simplicity of both the SOE and the Web ADF Framework in this pattern. 

Register the Class as a Managed Bean

When your Task code is complete, you need to register it as a managed bean. If you used a supported developer IDE, the Task template process created these entries for you.  If not, you can manually do this by opening the faces-config.xml file in your WEB-INF folder and scroll down toward the end of the file and append the following tag content below the last managed bean. 


And add the following as a map-entry under the root mapContext managed bean:


Add the task control to the JSP page with a reference to the managed bean

The final step in the process is to add the task control and link to your jsp page.  Open your mapviewer.jsp file and add the new task control to the list of tasks in your application.  The task tags are typically toward the bottom of the mapviewer.jsp file in the WMA.  Note, our task control assumes an associated TaskInfo class was created and links it appropriately here. 

  <!-- New SOE Task Tag in the JSP File -->
  <a:task id="helloWorldTask" value="#{mapContext.attributes.helloWorldSvc}"
taskInfo="#{mapContext.attributes.helloWorldSvc.taskInfo}" mapId="map1" />

Now add a task link to the ‘task-menu’.  In your WMA mapviewer.jsp file you will see this <div> tag content holding the applications Search Attributes task.

    <li class="menu-bar">
    <a href="#" class="menu-header" title="SOE Task" onclick="toggleWindow('win_EsriTaskCell_helloWorldTask');">
      <span>Hello World SOE</span>

 Run your application

 You nave now completed the steps to implement your custom task which consumes the HelloWorld SOE.  You can now deploy and run your application to see it work.  Once the application loads, you should see your ‘Hello World SOE’ link at the top of the Task Menu bar.  When executed the results are sent to the Results Panel as shown below: 


Consume your SOE in the Web ADF Task Framework

The Web ADF Task framework offers vast flexibility for you to consume your SOE’s in your web application.  The framework provides a mechanism that lets you focus on working with SOE’s instead of being concerned with low level implementations in your web application. 

Posted in Developer | Tagged , , , | Leave a comment

Install Java Web ADF NetBeans Plug-in

Currently our documentation explains how to install our NetBeans Java Web ADF plug-ins by accessing a URL.  The Java Web ADF SDK includes a local repository for our NetBeans plug-in modules which you can choose to install.  Here is the process for installing from the local Java Web ADF SDK: 

  • Click ‘Tools->Plugins’ from the main menu of the IDE.
  • In the Plugins window, select the ‘Downloaded’ tab.

  • From the ‘Downloaded’ tab, click the ‘Add Plugins…’ button and browse to the following directory in the Java Web ADF SDK, ‘<AGSHOME>javatoolsnetbeans_plugin’.  

  • In the list of available plug-ins, check the ‘Install’ check box associated with your ArcGIS Java ADF plug-in.  This will enable the ‘Install’ button. 

  • Click ‘Install’ and the NetBeans IDE installer window appears.

  • Click ‘Next’ to confirm the ESRI ArcGIS Java ADF for NetBeans plug-in will be installed. 
  • Read and accept the terms of the license agreement displayed and click ‘Install’.

  • After the installation completes successfully, click ‘Finish’ and restart the IDE.

On restart you should be able to opne the Plug-ins Dialog again and select the ‘Installed’ tab to see the list of installed plug-ins.  If everything went successfully, you should see the ESRI Java Web ADF plug-ins listed under the ‘Web & Java EE’ category. 


At this point you are ready to create your first ArcGIS Web Project

Posted in Developer | Tagged , , | Leave a comment

Blending: where does this happen?

Ever wonder what “Blending” in the browser or web tier really means with respect to the Java Web ADF?

The topic is somewhat mysterious. The confusion is understandable, as the discussion hasn’t necessarily been brought to the forefront of the Java ADF documentation. The question is often asked: “Where does the application blend the images together from different map resources?”.

This image “fusion” can take place either in the web browser or it can happen in the web server.

The answer is that if your application contains at least one tiled/cached map resource, along with any others, then this “blending” takes place in the web browser. If a tiled/cached map resource is not present, then all exported images from the ArcGIS Server are assembled at the Web Server level.

Now, does this really matter? Well, it could have an effect on performance, obviously. If the web server is busy “fusing” away for all concurrent users, application response times could be impacted. If the blending is off-loaded to your user’s web browser, the web server is free to do more work.

I’m hoping this clarifies things a bit!

Posted in Developer | Tagged , | Leave a comment

SOE Patterns

There are two parts to a successful pattern with respect to Java Server Object Extenstion (SOE) development which emulates Java EE patterns of separating reusable business logic from specific service level logic.  David has a terrific introductory post to SOE’s which you should read if you are new to SOE’s.  He profides links to the online documentation as well to help get you started. 

Reusable Business Logic pattern for SOE’s. 
SOE’s extend Server Objects by producing a feature capability on a Server Object.  At 9.3.1, Java supports SOE’s with Map Server Objects, so Java SOE’s produce a feature capability on Map Server Objects.  There are multiple steps to synchronizing a SOE feature capability with Map Server Objects.  First we must deploy/register the SOE so the ArcGIS platform can use it and then we need to enable it on a Server Object Type.  For Java, we are currently limited to Map Server Objects.  Once we enable SOE’s on a Map Server Object, it’s feature capabilities are available on all Map Server Objects.  Given this design feature, the Reusable Business Logic pattern promotes encapsulating all business logic (feature capabilities) in SOE’s such that they can be used across all Map Server Objects they extend.  Examples would be, export layer as shapefile or ESRI GRID, Layout View for printing or cartographic products, distance calculations to features, proximity analysis, etc.  

Service pattern
Once our SOE has the encapsulated reusable business logic as a feature capability on all of the Map Server Objects, we can now extend the Web ADF to create service level features.  This way we don’t put all of our application logic into SOE’s which are specific to a single Map Service.  This could cause performance/scalability issues in an enterprise class architecture so by using this pattern we aim to decouple the service level logic from the business level logic. 

Example Architecture
As an example of using both parts of this SOE pattern, lets examine a hypothetical Insurance Application which requires spatial functionality to help determine a risk assessment to be used in the underwriting process.  The application features and results are detailed below: 
Application Features:

  1. Geocode an address
  2. Determine distance to facilities
  3. Determine proximity to natural hazards and zones
  4. Determine what rating territory address is located in

Application Results

  1. A Spatial Risk Assessment value (number)

Using the pattern described above, we would abstract the features into the SOE and use the Web ADF for specific application service level logic.  An example of breaking our features into SOE’s and Service extensions are offered below: 
Reusable Business Logic:
Distance SOE:

  1. Parameters: Takes an address and an array of n layers. 
  2. Returns: An array of distances from address to the layers submitted.

Proximity SOE:

  1. Parameters: Takes an address, an array of  n layers.
  2. Returns:  A Proximity value and/or geometry representing proximity values spatially.

Assessment SOE:

  1. Parameters: Takes an array of distances (double), an array of proximity values (double), and a rating territory (integer)
  2. Returns: A Spatial Risk Assessment value (double)

Service Logic: 
Spatial Risk Assessment Task (Extend the Web ADF Task Framework):


  1. Address, user can select a feature address from the map. 
  2. Facility Layers, user can select from a list of layers or on the map.
  3. Hazard Layers, user can select from a list of layer or on the map.
  4. Hazard Zones, user can select from a list of layers on the map.


  1. A Spatial Risk Assessment value for the address submitted.

The user application workflow presents a Web Application that has a Spatial Risk Assessment Task which collects an address parameter from selections made by users either by entering an address into a form or selecting a location on a map.  Once the task has the address it then goes through the following workflow: 

  1. Gets distances from Distance SOE.
  2. Gets Proximity values from Proximity SOE
  3. Searches Rating Territory DB/layer to get a rating territory from address

Now the Web Application Task submits the return values of distances, proximity, and rating territory to Assessment SOE for a Spatial Risk Value associated with the address submitted or selected from the map and returns this to the user. 
This example architecture separates out reusable spatial business logic from map service specific logic and data.  You could encapsulate all of this logic in a single SOE, but this is not a preferred approach for enterprise applications as it would be bound to the service level of the application and not reusable in the enterprise.




Posted in Developer | Tagged , , , , , | Leave a comment

Simplify your GIS Web Development using the Java Web ADF

Java is a very loosely coupled technology with respect to the amount of API’s available and consequently inherently complex.  On the one hand, such low level access to toolkits is attractive to advanced developers (when exposed to well documented API’s and/or source) but on the other hand, quite unattractive to managers.  Application Frameworks are one way to encourage good design and make programming easier by restricting your programming choices to a subset of proven patterns.  This makes the underling toolkit less confusing.  While you may find our ArcGIS Server Java products complex as well, a good understanding of our application framework, the Web ADF, will simplify your development experience. 

The ESRI ArcGIS Server for Java Web ADF platform architecture emulates the successes provided in Java/JavaEE by simplifying the following ArcGIS technologies:

  1. ArcGIS ArcObjects, which form the lowest level component architecture, is a fine grained component toolset for GIS.
  2. ArcGIS Server is a distributed computing platform built on top of ArcObjects for GIS capabilities.  ArcGIS Server provides a container specific to hosting components built on top of ArcObjects.  
  3. ArcGIS Java Web ADF is a framework on top of ArcGIS Server/ArcObjects which simplifies the development of server-side/client-side GIS web applications

The tools ESRI provides for building GIS Web Applications includes ArcObjects as the programming model/interface and ArcGIS Server as the hosting environment.  Building GIS Web Applications with these tools alone can be a sophisticated process and is the foundation for providing the Java Web ADF.  In order to be successful with the tools, users have to become intimately familiar with how it operates.  The Web ADF simplifies development by employing ArcGIS Server Resources and providing a framework of classes on top of ArcObjects (e.g. WebContext) for building applications.  This is a similar approach to the way Struts employs servlets and JSP’s and provides a framework of classes (e.g. ActionMapping) for building applications to the MVC framework.  This simplification qualifies the Java Web ADF as a GIS application framework for ArcGIS Server.  This design paradigm has been used successfully in simplifying many complex Java/JavaEE system architectures.

While there are competing mapping frameworks in the Web 2.0 space, there are no application frameworks competing against the ArcGIS Web ADF which can integrate or add value to enterprise architectures.  There are competing toolsets and servers, but no frameworks for developing web applications and consequently, it is a sophisticated process to build enterprise GIS web applications outside of the Web ADF.

Posted in Developer | Tagged , , , | Leave a comment