2007年8月21日 星期二

How to setup Java Connector Samples for ArcIMS

How to setup Java Connector Samples

The jspsamples.war can be found in {$ArcIMS_Home}\Samples\Java.
Copy it to {$Tomcat_Home}\webapps for automatically depolying as web site jspsamples.
In this case, {$Tomcat_Home} would be set to C:\Tomcat5.5

Step I. Modify web service document
1. Modify the map file SantaClara.axl -
The map file is stored in {$ArcIMS_Home}\Samples\TutorialData\AXL, while the corresponding shape files are saved in the

folder under {$ArcIMS_Home}\Samples\TutorialData\
It is able to use ArcIMS Author to make sure it is available to load.
Before that, in the map file SantaClara.axl, following tag must be revised to indicate where the shape files exist.

tag:WORKSPACES
child_tag:SHAPEWORKSPACE name="shp_ws-0" directory="D:\arcgis\ArcIMS\Samples\TutorialData\SantaClara"
tag:WORKSPACES

2. Make up context file -
Under the folder {$Tomcat_Home}\conf\Catalina\localhost
Create a xml file, say JavaConnSample.xml, with following content:

tag:Context docBase="D:\GISProj\ArcIMSTest\Output" path="/JavaConnSample"

Then, ArcIMS will create map images and output to D:\GISProj\ArcIMSTest\Output
The WebSite can present these images from http://snowlin:8000/JavaConnSample through the configuration of xml file.

3. Check or Alter web service properties - jspsamples.properties
The jspsamples web site will drive ArcIMS service by jspsamples.properties file that is located at
{$Tomcat_Home}\webapps\jspsamples\WEB-INF\classes
The default value is as following

host=localhost
port=5300
arcmapservice=arcmapSample
service=SantaClara
streamservice=SantaClaraStream

where, the host and port conduct ArcIMS service site, service and streamservice will be mapped to the configuration in Step

II.

Step II. Configuration in ArcIMS Administrator
1. Check out map file
The map file SantaClara.axl is stored in {$ArcIMS_Home}\Samples\TutorialData\AXL.
It is able to use ArcIMS Author to make sure it is available to load.

2. Create Service SantaClara with following Service Information
Service Name: SantaClara
Map File: D:\arcgis\ArcIMS\Samples\TutorialData\AXL\SantaClara.axl
Virtual Server: ImageServer1

herein, the Service Name and Map File are defined by jspsamples.properties.

3. Server Output - Create an output folder to save temporary map images and display through URL
Image Type: JPG, PNG...(Select one)
Directory Location: D:\GISProj\ArcIMSTest\Output
HTTP Location(URL): http://snowlin:8000/JavaConnSample

where, "Directory Location" and "URL" are the same setting as "docBase" and "path"

Note: The default sample is presenting Santa Clara city map, there're other samples like San Francisco, World, Canada, etc.

Just following steps above and change "SantaClara" as "SanFrancisco", then create new service in ArcIMS.
While both SanataClara and SanFrancisco services are running, jspsamples.properties file will be the key to decide which

service is linked.

沒有留言: