INT003 - Using the LANSA User Agent
The components involved in a transfer of a data file from a PC to a server via the LANSA User Agent are:
- The data file on the PC, containing the data to be processed. This can be a CSV file, an Excel Spreadsheet or several other formats.
- The host configuration file (.lih) on the PC. This identifies where the server is, and the identifier of the server program that will handle requests.
- The PC End-User: The user selects the data file to be sent, selects the configuration file and initiates the transfer by pressing Send.
- The LANSA User Agent: This is the application used by the end-user. It resides on the PC. It interprets the configuration file selected by the user and sends the request to start the server program. It also formats and sends the data file to JSM when requested.
- JSM: The JSM receives the name of the server program and uses the server program identifier and the host URL to locate and execute the proper function. If the Server function is running on an IBM i Server using LANSA for IBM i, the function name entry is located in file [email protected] If the Server function is running on a Windows Server using LANSA, the function name entry is located in the file DC_W29.txt
- The Server function. This is a LANSA function that can be on the IBM i, or on Windows. It is started by the JSM and once started it starts the HTTPService service and requests the data from the LANSA User Agent, via JSM.
- JSMDirect is an HTTP extension to the Java Services Manager. It enables a LANSA or an RPG program using the Java Services Manager to participate in Web services for B2B transactions. The JSMDirect CGI program handles the reading of the HTTP request and sending of the HTTP response. For example, a browser might request the following: http://mycompany/cgi-bin/jsmdirect?orderentry.
Note: As described above, the User Agent is a small Java application which can be used by any remote location to upload a file to a server and initiate a program to process it. A User Agent solution can also be defined and run using Integrator Studio. This exercise will use Integrator Studio. See the Integrator documentation for more information about the User Agent.