Registering Functions for JSMProxy
On Windows and Linux, the JSMProxy program performs a keyed lookup on file dc_w30.txt to locate the remote host and program that will receive the forwarded request.
The Host Name is the host component of the request URL this is determined by the HTTP protocol Host keyword.
If the URL is http://www.lansa.com/cgi-bin/jsmproxy then the Host Name is WWW.LANSA.COM:80.
If the URL is http://10.1.2.3/cgi-bin/jsmproxy then the Host Name is 10.1.2.3:80.
This allows multi-homing where the IP address of www.lansa.com and 10.1.2.3 are the same but the HTTP client program specifies the host name in the HTTP protocol allowing the HTTP server to treat www.lansa.com and 10.1.2.3 as different hosts.
A Host Name of *DEFAULT means any host.
JSMProxy first does a keyed lookup for on the Application Name and Host Name, if an entry does not exist then a second keyed lookup on Application Name and *DEFAULT is done.
If the service (application name) does not exist, JSMProxy returns an error message otherwise the connection is forwarded to the selected remote host and remote program.
To update the dc_w30.txt file use LANSA Integrator Studio or a text editor (Notepad for example).
The dc_w30.txt file is structured as a list of comma separated lines.
Lines starting with a # are comments and will not be processed.
Each line in the text file is an individual entry. The fields are separated with a comma.
Structure of file dc_w30.txt:
Field No |
Description |
Details |
1 |
Application Name |
Name identifying the application to be executed on the remote host. |
2 |
Host Name |
Host Name specified either as *DEFAULT or HostName:Port. |
3 |
Method Accepted |
The proxy program checks the method field to see if the request method is allowed. Possible method field values are: |
4 |
Content Limit |
The proxy program checks the content limit field to see if the inbound content does not exceed the limit value. |
5 |
Remote Host |
Remote Host specified as HostName:Port. |
6 |
Remote Program |
If the remote program is blank, it will default to /cgi-bin/jsmdirect. |
Example
#
# JSMProxy directive file
#
# service, local host, method, limit, remote host, remote program
#
ORDERENTRY,LANSA01:89,GET/POST,100000,LANSA01:88,/cgi-bin/jsmdirect
ORDERENTRY,*DEFAULT,GET/POST,100000,LANSA01:88,/cgi-bin/jsmdirect
#