ArcGIS Server: Developing Applications  

Migrating Applications to 9.2

ArcGIS Server 9.2 introduces several new and improved functionalities to the core server capabilities and the ADF. Some of the key items that differentiate the ADF at 9.2 from the previous versions are,

 

Multi-Source

 

At 9.2, there is a new multi-source ADF to display multiple map resources at once. The single-source ADF still exists and contains the same functionality available in 9.1. Before using the multi-source ADF, there are several important points to keep in mind:

 

Managed Context Attributes

 

The managed context attributes retain the same business logic (implement WebContextInitialize), but they differ in the manner of hooking into the framework. At 9.1, they were added to the managed-context-attributes.xml. However, now they are added to the faces-config.xml.

 

Custom Tool

 

Custom tools now work in a slightly different manner than previous versions. At 9.1, they worked with eventargs such as MapEventArgs or ClientEventArgs. For example:

 

public class PanToolAction implements IMapToolAction {
	public void execute(MapEventArgs args) throws Exception{}
}
              

 

At 9.2, they will work directly with the MapEvent:

 

public class PanToolAction implements IMapToolAction {
	public void execute(MapEvent args) throws Exception{}
}
              

 

Another benefit of 9.2 custom tools is that there is no need to register the tool. You were previously required to add it to the default.xml in the tools folder at 9.1. This is no longer necessary.


Java Server Pages

 

JSP tags have been changed at 9.2. The following summarizes the differences:

At 9.1:

Example code:

<ags:context id="mapContext" resource="Mexico@Host">
 <ags:map id="Map0" left="233" top="65" width="535" height="438" borderWidth="2" borderStyle="solid" />
</ags:context>

At 9.2:

Example code:

<a:context value="#{mapContext}" />
<a:map value="#{mapContext.webMap}" id="map1" width="800" height="600" />

 

Transport Protocol

 

The ADF uses the WSDL proxies for all its stateless interaction with the ArcGIS Server:

 

 

 

Converting Between Proxy Types

 

Certain functionality will require interacting with ArcObjects directly. You should obtain the server context from AGSLocalMapResource and use the utility method from AGSUtil. For example:

AGSLocalMapResource agsMapRes = ...
IServerContext serverContext = agsMapRes.getServerContext();
com.esri.arcgisws.Geometry geom = ...
IGeometry igeom =(IGeometry)AGSUtil.createArcObjectFromStub(geom, serverContext);
IGeometry bufferedGeom = doBufferMethod(igeom);
com.esri.arcgisws.Polygon wPoly = (com.esri.arcgisws.Polygon)AGSUtil.createStubFromArcObject(bufferedGeom, com.esri.arcgisws.Polygon.class,serverContext);

 

Working with Custom Functionality

 

Several items to keep in mind when writing custom functions: