HOW TO
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.
Code:
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)
System.QueryLocalMachineName(machine,machine.Count)
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
'-- object.
web.SendRequest(_WebServerURL+"?Reg="+mapName
+"&Machine="+theMachine
+"&Port="+MyPortString
+"&Timeout="+theTimeOut
+"&Retry="+theRetry
+"&MaxPending="+theMaxPend)
inp = InternetProjectProperties
inp.settimeout(theTimeOut.asnumber)
inp.setretry(theRetry.asnumber)
inp.setmaxpending(theMaxPend.asnumber)
inp.setnetscape(true)
inp.setport(WebServerPort)
inp.setwebserver(WebServer)
av.getproject.getextension(InternetProjectProperties).setmapserver(mapName)
Code:
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> Connected!
Thread-13> Response Content-Length: 15
Thread-13> Size: 15
Code:
<PARAM name="ServerUrl" value="/.esrimap">
Code:
<PARAM name="ServerUrl" value="/servlet/com.esri.esrimap.Esrimap">
Code:
web.SendRequest(_WebServerURL+"?UnReg="+mapName+"&Machine="+theMachine+"&Port="+MyPortString
Article ID:000002378
Get help from ArcGIS experts
Download the Esri Support App