Interested in finding out now about what is coming at 10.1 for Java SOE developers? 10.1 Beta 2 is ready, and the beta resources are available now. Here is an excerpt from the Help documenation that gives some early insight...

ArcGIS 10.1 for Server has many changes that affect server object extensions (SOE) and make them generally easier to deploy. Here are some differences of which you should be aware:
  • Updated SOE templates integrated in IDEs—The templates for building REST and SOAP SOEs have been upgraded for 10.1.

    In the .NET template, .NET attributes contain all the essential information about your SOE, such as the properties and capabilities it exposes. This allows the SOE to be packaged and prepared for deployment when you build the software. You'll also notice that .NET SOEs no longer derive from ServicedComponent. The migration path to 10.1 for .NET SOEs is to copy your existing code or projects into the new templates and rebuild. See Migrating a .NET server object extension to 10.1 to learn more.

  • One-step deployment—You now deploy an SOE using a .soe file that is created through a post-build step. You can then register the SOE in one step by browsing to the .soe file in ArcGIS Server Manager. You don't have to run any commands or write any extra code specifically for registering the SOE.
  • 64-bit requirement—Since ArcGIS Server is now supported only on 64-bit operating systems, you must build your SOE to be 64-bit compatible.
  • Manager integration—A new panel in Manager allows you to view your available SOEs and deploy new ones.
  • More debugging options—Manager now allows you to set a delay on service startup, allowing you to hit breakpoints and step into SOE code that executes when the service starts. You can also specify a port range for debugging Java SOEs.
  • Easier creation and customization of property pages—If your SOE exposes properties, a basic property page is now created automatically that administrators can see when editing your service in Manager. (In previous releases of ArcGIS Server for the Microsoft .NET Framework, you had to develop this property page yourself.) If you want advanced page elements beyond the default input text boxes, you can develop your own property pages for Manager. You can also write property pages that integrate with the Service Editor dialog box in ArcGIS for Desktop.
  • Easier access of SOE properties in ArcGIS for DesktopYou no longer have to stop a service to edit its properties in the Catalog tree. This means that while a service is running, you can access the SOE to enable it and modify its properties page. When you apply the changes, the service is restarted.

 

Migration of 10.0 SOEs is an important topic for many of you as you make plans to upgrade to 10.1. Here are some helpful bits of information:

Migrating a Java server object extension developed for ArcGIS Server 10.0 to ArcGIS for Server 10.1 requires some modifications to the SOE's source code. This topic discusses the required modifications and describes a new Eclipse wizard for exporting Java SOEs. It also explains the absence of the SOEManager tool at ArcGIS 10.1.

Steps:
  1. Modify your SOE's ServerObjectExtProperties Java annotation.

    When an SOE is created using the Eclipse SOE creation wizard, the generated code includes a Java annotation called ServerObjectExtProperties, which holds metadata for the SOE. At ArcGIS 10.0, this annotation had the following attributes:

    • displayName—User-friendly display name of SOE
    • description—Multiline description of the SOE
    • defaultSOAPCapabilities and allSOAPCapabilities—Capabilities of the SOE
    • properties—Properties of the SOE as name = value pairs
    • supportsMSD—Flag to indicate that SOE supports MSD-based services

    At ArcGIS 10.1, with the introduction of service definition-based map services, the supportsMSD attribute is no longer required and has been removed. All other attributes remain unchanged. You must therefore modify your ArcGIS 10.0 Java SOE's ServerObjectExtProperties annotation to look similar to the following, to work at ArcGIS 10.1:

    @ServerObjectExtProperties(displayName = "Simple REST SOE", 
    	description = "My Simple REST Server Object Extension.",
    	defaultSOAPCapabilities = "", allSOAPCapabilities = "", 
    properties = "")
    
  2. Modify the SOE to use ArcGIS Server 10.1 map services.

    ArcGIS 10.1 does not support map services based directly on MXD documents; instead, it supports map services that are based on service definitions.

    You will therefore use the com.esri.arcgis.carto.IMapServerDataAccess interface to access layers available via a map service at ArcGIS 10.1. The following code snippet demonstrates how to obtain a handle to a feature class exposed as a layer via a service definition-based map service:

    IServerObjectHelper soh = …; //accessible to SOEs at runtime
    IMapServerDataAccess mapServerDataAccess = (IMapServerDataAccess) soh.getServerObject();
    IMapServer3 ms = (IMapServer3) mapServerDataAccess;
    String mapName = ms.getDefaultMapName();
    int layerId = . . .;//integer id of the feature layer you are interested in accessing
    FeatureClass fc = new FeatureClass(mapServerDataAccess.getDataSource(mapName, layerId));
    

 

Posted by eric906 | 2 Comments
We are proud to announce the initial release of ArcGIS on the Android platform.  You can install it from the Android Market now.  More information provided by the ArcGIS Mobile Blog
Posted by dano | 0 Comments
Filed under: , ,

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.

Summary

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!


The Map Widget for ArcGIS is a mapping component based on the ArcGIS API for JavaScript that adheres to IBM's iWidget Specification. This Widget allows you to add mapping and GIS analytical capabilities to composite applications built with IBM products such as IBM Mashup Center, IBM WebSphere Portal Server, and IBM Cognos.

The Map Widget can be used to display geographic data stored in ArcGIS Server map services and Spatial Data feeds on ArcGIS Online or ArcGIS Server basemaps enabling ESRI to provide Geographic Business Analytics to the Desktop.

The Map Widget can be used to display geographic data stored in ArcGIS Server map services and Spatial Data feeds on ArcGIS Online or ArcGIS Server basemaps enabling ESRI to integrate GIS with Business Analytics.

Benefits of Map Widget for ArcGIS:  

  • Built to standard provided by IBM
  • Lower development costs, deliver rapid integrated applications.
  • Empower business users by improving effectiveness and save time
  • Unlock siloed information from spreadsheets et. All, with geographical content by visualizing data
  • Multiple deployment platforms, IBM Mashup Center & IBM Portal Server.  

Included with Map Widget for ArcGIS

  • Send/Recieve events to other iWidgets and Portlets
  • Configure base maps for ArcGIS Online and ArcGIS Server
  • Add operational layers from ArcGIS Online and ArcGIS Server
  • Rich user interactive map operations

Resources

  1. You can download the Map Widget for ArcGIS from IBM Lotus and WebSphere Portal Business Solutions Catalog
  2. The Map Widget for ArcGIS is open source.  You can obtain the source code distribution for ArcGIS Online 
  3. The Map Widget for ArcGIS is based on the iWidget 2.0 specification
This is a first in a series of posts which will dive into using and extending the Map Widget for ArcGIS. 
Posted by dano | 0 Comments
Filed under: , , , ,

 

We are excited to announce that the ArcGIS API for Android is in public beta and available for download from our beta community site! Use it to build Android mapping applications that:

 

·       Access dynamic, tiled, and feature map services

·       Overlay graphics

·       Search and identify

·       Perform advanced analysis

·       Collect and edit data from your android phone and tablet devices

 

Access the Online documentation and Get started today!

 

The Android Team

 

Posted by eric906 | 0 Comments
Filed under: , ,

Map caching is a very effective way to serve map documents faster. When you create a map cache, the server draws the entire map at several different scales and stores copies of the map images. The server can then distribute these images whenever someone asks for a map. It's much quicker for ArcGIS Server to hand out a cached image than to draw the map each time someone requests it. If you are unfamiliar with map caching, the What is map caching topic in the Server online help will help you get started.

 ArcGIS Server provides many out-of-the box utilities to create and manage map caches. These utilities are also available on the Unix platform. In Windows, the cache management utilities are available as geoprocessing tools which you can access through ArcCatalog. Whereas on Unix, these tools are available as shell scripts in the "/ArcGIS Server installation directory/java/tools/caching" folder. These scripts will help you generate, update and manage your map caches on Unix. Let me give you a quick overview on using these scripts:

Preparation:

Before running any scripts, it is good practice to verify the permission of the script files and cache output folders. I have put together a brief checklist for successfully running the cache scripts.

  1. Your user account must be a member of 'agsadmin' group and must have read and execute access to the cache scripts. Managing user accounts on Linux/Solaris provides a detailed description of the user accounts created during ArcGIS Server installation and the Adding administrative users to the agsadmin group describes how you can add new users to agsadmin account.
  2. Your account must have write access to the cache output location.
  3. If you will be running long cache jobs using 9.3.1 or earlier versions, you must stop the server and update the <enginecontexttime> parameter in "/ArcGIS installation directory/server/system/Server.dat" file to "360000" seconds. (This step is not required for the latest ArcGIS 10.0 release.)
  4. If you are running cache scripts in a distributed setup, all the SOCs must have access to the map documents. Also, you will notice a marked increase in performance, if the map documents are available locally on all the SOC machines. You can also achieve optimum performance, if the number of SOC instances (S) that you created is at least one more than the no. of CPU cores. S = (no. of CPU cores) + 1. 

Running Scripts:

After preparation, you can execute the appropriate shell script from "/ArcGIS Server installation directory/java/tools/caching" directory. The Cache generation and updates on Linux/Solaris topic provides a detailed description of all the scripts, their parameters and when they should be used. When executing the scripts you might notice that some of the parameters are exclusive to Unix. Here is a brief description of those exclusive parameters.

  1. Context: In ArcGIS Server 9.3.1 and earlier versions, the user is prompted to choose between "engine" or "server" context. Choose "server" context to run the tool. This parameter is not required in ArcGIS Server 10.0. 
  2. Domain: Enter the fully qualified hostname of the machine where ArcGIS Server is installed.
  3. Username/Password: Type in the user name/password used to connect to ArcGIS Server Manager. 
  4. Server_name: Type in the name of the host machine where ArcGIS Server is installed or the ArcGIS SOM machine, hosting the service to be cached. 
  5. Object_name: This gives you a list of map services currently running that meet the requirements of the script being executed. For example, if the cache tiling schema for a map service is not configured, it will not be listed in the options for the ManageMapServerCacheTiles script, even if the service is running.

All other parameters are similar to caching tools on Windows and you can find more information on them in the Cache generation and updates on Linux/Solaris topic that I mentioned earlier.

Some Additional Tips on Caching:

Lastly, here's a short list on caching tips that might help you in general.

  1. Create cache on demand for regions that are not accessed very often. It helps in shrinking the cost of creating, storing & maintaining cache.
  2. Divide cache jobs into smaller tasks using feature classes or extents.
  3. Follow best practices to avoid label overlaps and to design cache customized to user requirements.
  4. You can create a cache schema using ArcGIS Manger. However, to create cache tiles based on the schema you must run ManageMapServerCacheTiles script.
  5. Generate cache in staging environment and then copy the cache over to production environment since cache generation is a resource intensive process.
  6. If your source data tends to change and if you need to run the scripts very often, you can
    1. Create a Python script to automatically run the Manage Map Server Cache Tiles script on a regular basis to update all or selected areas of your cache. Before running caching scripts, you must execute the command source /arcgis/server10.0/servercore/.Server/init_server.sh as described in Step 2 of Viewing and Managing Network Ports on Linux/Solaris. See Automating cache creation and updates with geoprocessing for an example.
    2. Schedule the automated scripts to run at a particular time using "crontab" when trying to regularly update cache.
Hope these tips help you in getting started with map caching. Also, just as a fyi, we have added several new documents on caching and you can access them through online web help.

 Content contributed by Garima Tiwari, Product Engineer, ArcGIS Java Team.

Posted by ajoseph | 0 Comments
Filed under: ,

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. This populates the Managed Bean section, under Managed Bean Class press the Browse button.



  4. Type AgsMapResource in the Select Entries text box and click OK



  5. Under Initialization delete the following managed-property settings using the Remove button:
    1. user
    2. serverObjectName
    3. hosts
  6. 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



  7. Your managed bean properties should resemble the following settings with values for your connection.



  8. 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. 


The ArcGIS Plug-in for Eclipse IDE has been improved in this release and includes a new ArcObjectsCodeValidator feature.  As an ArcObjects developer, you may have encountered a few classes and interfaces that do not support Java style casts and type-checks as described in Casting and Runtime Type Checking topic. However, consulting this topic during development has been very inconvenient, especially for new developers who are often caught off-guard by the runtime exceptions. The new validator feature will help you identify unsafe casts and type-checks in your code and rectify them in a few mouse clicks.

How to use AOCodeValidator?

Since, the Validator is bundled along with ArcGIS Plug-in, you must install ArcGIS plug-in to take advantage of it.  After installing the plug-in, you can enable or disable the Validator for any project in your current workspace. You must right-click on the project and select ‘ArcGIS Add/Remove ArcObjects Code Validator’ from the context menu to enable the Validator.  You will notice an ArcGIS globe icon on the project when the Validator is enabled.

Once you have enabled the Validator, the workflow for validating and fixing errors is simple and similar to syntax checking. The Validator will mark all the unsafe casting and type-checking errors with Eclipse error icons (red dot with a white X) in the left margin. You can double-click on the error icon and chose appropriate replacement code to fix these errors as shown below.


 

At this release, the following ArcObjects errors are identified by the ArcObjectsCodeValidator.

  • Unsafe casting of classes

  • Unsafe casting of interfaces

  • Unsafe type-checking of classes

  •  Unsafe type-checking of interfaces


We hope, the new AOCodeValidator feature will help you avoid a few runtime exceptions and logical errors and save you some valuable time. Please let us know your remarks and suggestions for this feature; we are eager to read your comments.

Content contributed by Sankar Sinha, Product Engineer, ArcGIS Java Team

Posted by ajoseph | 1 Comments

At 10.0, the Java Web ADF adds support for viewing imagery and geocoding addresses using Bing Maps. You can take advantage of this new functionality by creating web applications either through ArcGIS Manager or through the Netbeans and Eclipse IDE plug-ins. The support for Bing Maps includes new classes in the com.esri.adf.web.ve.* packages. (ve stands for Virtual Earth, the former name of Bing Maps). These classes work with the Bing Maps Imagery and Geocode Web Services via SOAP.

Using Bing Maps imagery is as simple as adding a Bing Maps Imagery service to the web application. ArcGIS Manager and the IDE plug-ins allow you to customize a few properties while adding the service. These properties are available on the service's Properties dialog.

For example, you can choose a specific culture for displaying the map labels or you can defer to the machine’s locale. Using the machine’s locale will allow the same web application to display Japanese labels when run on a machine with Japanese locale, and French labels on a machine with French locale, without requiring any change or customization to the application.

You can choose whether to use the service from Microsoft's staging servers or production servers.You would typically use the staging servers during development, and then switch over to production servers when you are ready to deploy your application.

You can pick a map style (‘Roads’, ‘Aerial’, or ‘Aerial with labels’) while adding the service, but you can also change the style from within the web application by right-clicking on the service's "Map Style" node in the Table-of-Contents control.

 

The Bing Maps Imagery service is supported through the VEImageryResource class in the ADF. The classes VETocFunctionality,VEOverviewFunctionality, and VETileFunctionalty & VEImageryFunctionality provide the necessary implementation for supporting Bing Maps imagery in the Table-of-Contents, Overview, and Map controls respectively. It is these classes that are wired up in faces-config.xml when you add a Bing Maps Imagery service through ArcGIS Manager or IDE plug-ins.

You can also use the Find Address task to geocode addresses using the Bing Maps Geocode service. This task also existed in previous releases, although it only supported ArcGIS Server and ArcIMS Server Geocode services. At 10, the task supports Bing Maps Geocode service through the VEGeocodeFunctionality and VEGeocodeResource classes. By default, the Find Address task uses a single, all-purpose field with the Bing Maps Geocode service to find both addresses (eg: 380 New York St, Redlands, CA, 92373) and places (eg: Disneyland), but you can customize which address fields to use and specify user-friendly names for those fields. You can find more information about this in the javadoc.

Posted by technobrat | 0 Comments
Filed under: ,

"The ArcGIS Resource Center has been updated recently to include some great enhancements to the overall user experience! This release of the Resource Center coincides with the release of ArcGIS 10, and includes additional improvements in the following areas:

  • Content organization-ArcGIS 10 and 9.3 specific, quick access to major collections (help, blogs, forums, knowledge base, data models) and Support.  
  • Search-filtering, version-specific searching, and improved results .
  • Gallery- new layout, sorting, filtering, versioning, and the ability to post to multiple galleries.

For more information visit What's new in Resource Center?

Also, please visit the new Developer SDK resource center. The Java link on the left will take you to ArcObjects and Server Web ADF SDKs and other Java community resources such as videos, forums and galleries.

 

Content contributed by Eric Bader, Product Manager for Java/Linux platform.

Posted by ajoseph | 0 Comments
Filed under:

Relationships are important. Not only in life, but also in data. Without relationships, data would exist in isolation and couldn't be analyzed effectively. In ArcGIS, relationships can be defined either by Relationship Classes in the Geodatabase, or by Relates in the Map Document. At 10.0, Java Web ADF recognizes relationships and displays related records for results of the Query Attributes Task, Search Attributes Task, and the Identify Tool. 

Related records are displayed in the Results panel, grouped under a node bearing the name of the relationship that they belong to. The relationship node appears for every result that participates in a relationship. Upon expanding this node, the related records are fetched dynamically. If these related records themselves participate in further relationships, the same principle is applied to display further related records.

At 10.0, ArcGIS Server Map services also support Tables in map documents. Tables are mostly like Layers except that they don't have spatial information and hence cannot be visualized on a map. Tables only have attribute data. Tables can also participate in relationships just like Layers, and the Results panel displays related records regardless of whether they belong to a Layer or a Table. The Query Attributes Task can be configured using ArcGIS Manager or the Eclipse/Netbeans IDE plug-ins to query Tables. However, the Search Attributes Task and the Identify Tool do not work with Tables.

In the example below, the Query Attributes Task was used to query the Meters Table which returned a single record (OBJECTID=45). This record is related to a record (OBJECTID=6) in the Faults Table via the Related Faults relationship, which in turn is related to the a record (OBJECTID=1) in the Inspectors Table via the Inspected By relationship. Notice that the related records are nested under a node representing the relationship.

For developers, the ADF provides a new RelateCriteria object that you can use to programmatically fetch related records. Also, the ArcGIS Java WebServices (AgsJWS) API contains new types StandaloneTableDescription and StandaloneTableInfo that represent tables in a map service.

The ArcGIS 10 Java Web ADF JavaScript API has been refactored to take advantage of the Dojo JavaScript toolkit. One such enhancement is the new addition of ZoomSlider, Navigator and CoordinateTracker to the map control. When you create a ADF application at ArcGIS 10, a default Navigator, ZoomSlider and Coordinate tracker will appear on the map control without any additional coding. The screenshot on the right shows the default Navigator, ZoomSlider and the CoordinateTracker in a mapcontrol. You can customize these components to suit your application or remove them if needed. Let us walk through the four simple steps to customize the ZoomSlider. 

Step 1: Hide the ZoomSlider

First, you must hide the default ZoomSlider by setting the showZoomSlider property of the map component to ‘false’ in your JSP file. 

<a:map id="map1" value="#{mapContext.webMap}" showZoomSlider='false'

width="800" height="500" style="border:1px solid green;" />

Step 2: Create your own ZoomSlider by modifying the ‘adf.css’

You may already know that a ZoomSlider is composed of a ‘zoom in’ button, ‘handle’, ‘tick’ and ‘zoom out button’. Each component of the default ZoomSlider is described in the adf.css. To customize the look and feel of the ZoomSlider, alter the corresponding CSS class of each component in ‘adf.css’. The table below shows the components and their corresponding CSS class name.

Zoom-in button  .slider. mapslider .vertical .plus
Handle  .slider .mapslider .vertical .handle
Tick  .slider .mapslider .vertical .tick
Zoom-out button  .slider .mapslider .vertical .minus

The snippet shows how to modify the default tick with a ‘myslider.png’ image.


Step 3: Add the custom ZoomSlider to Map Control

 The next step is to add the custom ZoomSlider to the map control. We can take advantage of the client-side Web ADF Javascript APIs and add the ZoomSlider to the adf.map instance. A ZoomSlider container must be defined and placed in the ‘controlDiv’ element of the ‘adf.map’ instance through a Javascript function as shown in the code snippet below.

function createCustomMapSlider() {

    var map = adf.Controls.maps['map1'];

    var slidergrandContainer = map.controlDiv;

    var sliderContainer = adfdojo.create('div', {

        id : 'mysldContainer',

        style : {

        position : 'absolute',

        top : '30px',

        right : '33px',

        zIndex : '99',

        height: '100px'

        }

    }, slidergrandContainer);

 

map.slider = new adf.MapSlider("mapSlider", sliderContainer, 'map1',

                                                        map.numLevels, map.level);

}

Also, notice that you can define the ZoomSlider’s position relative to the map, when creating the ZoomSlider container. When creating the ZoomSlider instance, you must define the number of zoom levels and the default zoom level. Each tick in the ZoomSlider represents a zoom level. Let’s say you have a cache service with 4 levels, the ZoomSlider can have four ticks to visualize every zoom level. 

Step 4 : Subscribe to ‘adf/map/map1/init’ topic

After adding the custom ZoomSlider to map control, you can simply register the createCustomMapZoomSlider function created in Step 3 through adfdojo.addOnLoad function. However, a custom zoom slider function must be called only after the map instance has been initialized, which typically happens in the map’s init method. At this release we have exposed a new ‘adf/map/mapid/init/’ topic which is based on dojo’s publish-susbcribe mechanism. This ‘adf/map/mapid/init’ topic is published, whenever the map instance identified by mapid is initialized. By subscribing the createCustomMapSlider function to this topic, you can avoid unexpected behavior. In general, it is recommended to subscribe to this map init topic, whenever you modify the properties of a map instance at the client-side. The code snippet below shows how to subscribe the createCustomMapSlider function to the topic.

<script type="text/javascript">

adfdojo.addOnLoad( function() {

var map = adf.Controls.maps['map1'];

if (map == null) {

adfdojo.subscribe("adf/map/map1/init", createCustomMapSlider);

} else {

createCustomMapSlider();

}

});

</script>

The image below shows a custom zoom slider created through the above steps.

 

You can see how easy it is to customize ZoomSlider. However, if you wish to remove the ZoomSlider, you can simply set the showZoomSlider property of the map instance to false in your JSP file or through client-slide JavaScript functions. Also, you can customize or remove the coordinate tracker and navigator by setting the showCoordinateTracker and showNavigator properties to false.

Content contributed by Haifeng Li, Product Engineer, ArcGIS Java Team.

Posted by ajoseph | 0 Comments

As most you already know, Java Web ADF is built on the Java Server Faces (JSF) technology which allows developers to build web applications and custom user interface components. JSF implicitly depends on other Java web application technologies such as Java Server Pages (JSP) and Servlets. At every major release, we try to align the ADF with the latest revisions of Java technology. By doing so, not only can we take advantage of new features and improvements but so can you as developers. Its a delicate balancing act where we weigh the benefits of moving upto newer versions versus the consequences of potentially breaking existing applications.

At 10.0, Java Web ADF provides support for and requires JSF 1.2, which in turn requires a web container that supports JSP 2.1 and Servlet 2.5. This means that you can no longer use some servers that you may have been using in the past, for instance, Tomcat 5.x. The System Requirements page contains the complete list of supported servers for 10.0 ADF. It is important to note that ADF only supports the JSF Reference Implementation (RI), code named Mojarra. Other JSF implementations such as MyFaces are not supported.

Overall, JSF 1.2, does an extremely good job of preserving backward compatibility. There are no rude surprises when dealing with application lifecycle or breaking changes when composing user interfaces. So most applications should just work after upgrading to JSF 1.2. However, you may be caught off-guard by subtle changes that need to be made in faces-config.xml for JSF 1.2. They are listed below -

1. <managed-property> declarations cannot contain empty <value/>, <list-entries/> or <map-entries/>.  For example, the following snippet contains a ‘fieldAliases’ property which is empty. This does not sit well with JSF 1.2 and the entire <managed-property> declaration needs to be removed. 

<managed-property>
 <property-name>fieldAliases</property-name>
 
<map-entries/>
</managed-property>

2. Java Type information needs to be added to all <managed-property> that use the Expression Language ( #{…} ) to reference managed-beans. There are 3 possible scenarios -

2.a. The <managed-property> could contain EL references in it’s <value>. In this case, a <property-class> needs to be added containing the fully qualified class name of the Java type that can be referenced. The type information can found in the javadoc for the class whose <managed-property> is being set. In the following example, the LayerDefinition’s property ‘renderer’ contains an EL reference. The method signature for LayerDefinition::setRenderer() in the javadoc contains the type information to use with <property-class>

<managed-bean>
 
<managed-bean-name>layer1</managed-bean-name>
 
<managed-bean-class>com.esri.adf.web.query.LayerDefinition</managed-bean-class>
 
<managed-property>
 
<property-name>renderer</property-name>
 
<property-class>com.esri.adf.web.data.renderer.WebRenderer</property-class> 
  <value>#{layer1_renderer}</value> 
 ...
</managed-bean>

2.b. The <managed-property> could contain EL references under <list-entries> . In this case, a <value-class> needs to be added containing the fully qualified class name of  Java types that can be referenced. The type information can found in the  javadoc for the class whose <managed-property> is being set. In the following example, the WebQuery’s property ‘layerDefinitions’ contains EL references. The method signature for WebQuery::setLayerDefinitions() in the javadoc contains the type information to use with <value-class>

<managed-bean>
 <managed-bean-name>webappQuery</managed-bean-name>
 
<managed-bean-class>com.esri.adf.web.data.query.WebQuery</managed-bean-class>
 
<managed-property>
 
<property-name>layerDefinitions</property-name>
 
<list-entries>
  
 <value-class>com.esri.adf.web.data.query.LayerDefinition</value-class>
 
 <value>#{layerdef1}</value>
 ...
</managed-bean >

2.c. The <managed-property> could contain EL references  under <map-entries> . In this case, a <key-class> & <value-class> needs to be added containing the fully qualified class names of  Java types that can be referenced as keys & values. The type information can found in the  javadoc for the class whose <managed-property> is being set. In the following example, the WebContext’s property ‘attributes’ contains EL references. The method signature for WebContext::setAttributes() in the javadoc contains the type information to use with <key-class> & <value-class>

<managed-bean>
 
<managed-bean-name>mapContext</managed-bean-name>
 
<managed-bean-class>com.esri.adf.web.data.WebContext</managed-bean-class>
 
<managed-property>
 
<property-name>attributes</property-name>
 
<map-entries>
 
 <key-class>java.lang.String</key-class>
 
 <value-class>java.lang.Object
</value-class>
 
 <map-entry>
  
 <key>map</key>
  
 <value>#{map}</value>
 ...
</managed-bean>

At 10.0, ADF applications created by ArcGIS Manager and Eclipse/NetBeans IDE plug-ins include the JSF 1.2 libraries and also take into account these faces-config.xml changes. But you may need to account for them when migrating existing applications.

JSF 1.2, JSP 2.1, and Servlet 2.5 are part of the larger Java Enterprise Edition 5 (Java EE 5) stack. This means that you can take full advantage of Java EE 5 in your ADF applications. One of the major goals of Java EE 5 is to simplify development of web and enterprise components, whether they be Web Services or Enterprise Java Beans. Java EE 5 also incorporates new language features of Java Standard Edition 5 (Java SE 5) like enums, generics, and metadata annotations.

In JSF 1.2, annotations can be used in managed-beans. The @Resource annotation allows the framework to inject resources into the managed-bean instead of requiring developers to lookup those resources using JNDI. This is popularly referred to as dependency injection. The @PostConstruct and @PreDestroy annotations allow methods to be called just after the managed-bean is initialized and just before it is destroyed.

JSF 1.2 also deprecates it's own Expression Language (EL) in favor of the new Unified EL provided by JSP 2.1. This means classes such as MethodBinding and ValueBinding in the javax.faces.el package have been deprecated and you should switch over to using MethodExpression and ValueExpression from the javax.el package. The Unified EL makes it easier to integrate JSF components with JSP, and allows developers to extend the EL by plugging-in custom resolvers.  This article explains the motivation behind the Unified EL and provides some migration steps for JSF component developers. The Java EE 5 tutorial also contains a useful section on the Unified EL.

Such enhancements, coupled with numerous quality improvements, straightforward migration, and widespread adoption of Java EE 5, make JSF 1.2 the automatic choice for ADF at 10.0.

 

Posted by technobrat | 0 Comments
Filed under: , ,

ArcGIS 10 is expected to be released shortly and please visit the new What’s coming in ArcGIS 10 site for more information on 10. The demo videos on the site are awesome and a must watch to get an inside scoop on ArcGIS 10. Meanwhile, we have created our own set of casual videos and a few other samples to highlight ArcGIS 10 for Java/Linux platform. The video on what’s coming in ArcGIS 10 covers most of the significant enhancements and I encourage you to watch it for a broad overview on ArcGIS 10. But, here is a short note on ArcGIS 10 for Java\Linux developers in no particular order.

ArcGIS Server for the Linux platform

The past year, we vigorously tested the stability and scalability of ArcGIS Server on Linux platform. In our test environment, we were able to achieve a throughput of more than a million dynamic maps per hour (about 1.5 million maps) on a cluster of 8 machines (with a total of 64 CPUs). This effort has made the product more scalable and stable at 10. Also, we have automated the user synchronization of SOM machines and you do not have to manually synchronize users to handle failovers. The ‘How to automatically sync local ArcGIS Server Users between two SOM machines’ section in the help doc on Managing GIS Server User accounts describes the necessary steps you must take to achieve auto synchronization. For managing map caching workflows better, we have added new shell scripts to export and manage cache on Linux machine and have added new documents on cache generation. You might find them very helpful for creating and managing caches on Linux platform.

ArcGIS Server Web ADF 

On the Web ADF front, you will notice a significant performance improvement in startup and response time of the application. We have created a 10 min video on the Web ADF performance enhancements. Please watch the video to take advantage of all the new performance tuning features.  The other major enhancement is, our refactored Dojo based JavaScript API. The new API has several new dojo based adf events and allows seamless integration of Dojo and other third-party widgets in your web ADF application. Please download the sample application Dojo JavaScript API demo and watch the video on Dojo Widgets in Web ADF application to get started with the new JavaScript API.

ArcGIS Java Server Object Extensions

We introduced SOE’s in our previous release and have incorporated several of your feedback on development and deployment of SOEs in ArcGIS 10. To begin with, you can now access Server Object Extensions via REST as well as SOAP. This allows you to directly consume SOE services in SilverLight, Flex, JavaScript and Web ADF applications. The samples and help docs in ArcObjects SDK provides a step by step walkthrough on the development and deployment of SOEs. Alternatively, you can also watch the video, ArcGIS 10 : Server Object Extensions as SOAP services to understand the deployment steps to create SOAP services for SOEs. The second major enhancement is on the deployment aspect of SOEs. At 9.3.1, we provided a tool to register SOEs. But now, when you deploy SOE jar files, ArcGIS Server Manager will auto-discover them and you can register and unregister SOEs via Manager. 

Java Add-ins for ArcGIS Desktop

We have introduced add-ins at 10, which allows you to create custom buttons, tools and other UI elements for ArcGIS Desktop. Add-ins follow the plug-in model and are easy to install and uninstall. It is also very simple and easy to create an add-in using Eclipse IDE. Also, since add-ins are self-contained single archive file, it is very easy to share them via email, network share and public download. The video New at 10: Add-ins for ArcGIS Desktop can help you get started on creating, deploying and consuming add-ins in ArcGIS Desktop.

In summary, we encourage you to explore the new features at 10 and take advantage of them. We’ll discuss in detail the other areas of enhancements and migration strategies in the coming weeks.

- MJ 


Posted by ajoseph | 0 Comments

The 2010 ESRI Developer Summit is coming soon. Just like last year, it's happening in Palm Springs, CA from March 23rd to 25th. We have created a video invitation for you this time! In this video, David gives you a quick rundown of the Java technical sessions and demo theatres.

Here are the links to session descriptions if you need more information

Tuesday

Wednesday

Thursday

Demo Theater

  • Leveraging Geoprocessing tools and Python API for the Java platform
  • ArcGIS 10 Developer Web Services for the Java Platform

Apart from Tech Sessions and Demo theatres, you can also meet David and our Product Engineers and Developers one-on-one on Tuesday, March 23rd, 6:00- 7:30 P.M.

Also, you can attend the 22 User Sessions chosen by the user community.

Hope to see you all at Palm Springs again this year!

Posted by ajoseph | 0 Comments
Filed under: ,
More Posts Next page »