How To: Use Arcview IMS with ArcIMS on the Solaris platform
This document describes the methods required to use the ArcIMS servlet connector with Arcview IMS to dynamically serve maps on the Internet. Note that ArcIMS 3.0 for UNIX is only supported on the Solaris platform.
- Start Arcview and turn on the ArcIMS 3.0 extension (this will initialize IMS).
- The Esrimap servlet and the ArcIMS Application server are required. Make sure these ArcIMS components are installed and functioning (do a ConnectorPing and getVersion). To view the communication processes occurring on the ArcIMS Application Server:
a. Turn on the debug option in the appserver.properties file (debug=true).
b. Save the file.
c. Restart the service.
When the service is restarted, an ArcIMS message console window should open up.
- Since Arcview IMS on UNIX will not recognize the servlet information entered in the choose Web server dialog (step 7 in Using ArcIMS, Appendix A), a manual registration script is required. The manual registration script registers the Arcview IMS map server with the ArcIMS servlet/application server. In addition is sets a host of Arcview IMS project properties required to serve the view successfully. This is a sample script:
WebServer = "goose" '-- Web server on which ESRIMap DLL has been installed
WebServerPort = 1970 '-- TCP port on the web server computer which the web
'-- server uses to communicate with the Internet. If
'-- your web server uses the default port, leave as 80.
_WebServerURL = "/servlet/com.esri.esrimap.Esrimap"
mapName = "anyname" '-- Unique name used to identify each map application.
theTimeOut = "20" '-- # of seconds ESRIMap waits for AV when busy (2-300)
theRetry = "5" '-- # of times ESRIMap will try to reconnect to AV (2-10)
theMaxPend = "10" '-- # of requests that can be waiting for AV (2-50)
'-- Establish the socket with which ArcView will listen for communications
'-- coming from web server. The Dispatch script will parse the incoming
'-- communications. The TCP port number on this computer which the socket
'-- will use is specified as 0, so that the port number will be automatically
'-- assigned by ArcView.
'-- If you want to specify the TCP port number instead of having ArcView
'-- assign one automatically, change the 0 in the line below to be the
'-- port you want to use.
wl = Weblink.Make("AVINETMP.Dispatch",0)
'-- Get the TCP port that has been assigned to the Weblink socket.
MyPort = Socket.The.GetPortNumber
'-- Establish Internet object via which automatic registration will occur
username = ""
password = ""
web = Internet.Make(WebServer,WebServerPort,"","")
'-- Determine the name of this computer
machine = String.MakeBuffer(256)
theMachine = machine.Trim
MyPortString = MyPort.AsString
WebServerPortString = WebServerPort.AsString
'-- This automatically registers the mapName with the ESRIMap servlet
'-- by communicating with the web server referenced by the web
inp = InternetProjectProperties
You will need to change the Web server name and port for this to function. You can optionally change the mapname, maxretry, timeout, maxpending, and map server port (set in the weblink object).
- Run the script in Arcview and note the message console for the ArcIMS Application Server - the console should contain a reference to the registered map server. For example:
Thread-13> Got Query String: Reg=anyname&Machine=goose&Port=37510&Timeout=20&Retry=5&MaxPending=10 Servers available: anyname StatisticsServerThread-13>
Thread-13> Got key: Reg value: anyname
Thread-13> Trying to connect to: goose on port: 37510
Thread-13> Response Content-Length: 15
Thread-13> Size: 15
- In Arcview, create a Web page for your view (go to File > Web Page Setup)
- Note where the Web page was saved in the previous step. Open the <pagename>applet.html file in a text editor and find the following line:
<PARAM name="ServerUrl" value="/.esrimap">
Change it to:
<PARAM name="ServerUrl" value="/servlet/com.esri.esrimap.Esrimap">
Save the page.
- Open a browser and load the Web page. If the page is found then you will see communication between Arcview (map server) and the ArcIMS Application Server in the ArcIMS message console.
- You should only have to run the connect script once. If you need to run it again, be sure to unregister the Arcview IMS map server name with the esrimap component on the web server. Use the following script to unregister the Arcview IMS map server name. Some of the variables can be acquired from the script in step 3: