Before attempting to deploy and application using an AIA adapter, the connection to the required different components can be easily tested using the two following sample programs and a .pf file.
A simple server program (apps_prog.p) can be like this:
DEFINE OUTPUT PARAMETER c AS CHARACTER INITIAL "". OS-COMMAND SILENT hostname > hostname.txt. INPUT FROM hostname.txt. DO WHILE c = "": IMPORT UNFORMATTED c. END. INPUT CLOSE. RETURN
This program can go into the AppServer's working directory.
The client program (Apps_cli.p) can be like this:
DEFINE VARIABLE servhdl AS HANDLE. DEFINE VARIABLE ret AS LOGICAL. DEFINE VARIABLE C AS CHARACTER FORMAT "x(20)".
CREATE SERVER servhdl. ASSIGN ret = servhdl:CONNECT("-pf Apps_cli.pf").
IF ret THEN RUN apps_prog.p ON SERVER servhdl TRANSACTION DISTINCT (OUTPUT C).
DISPLAY C LABEL "Host " WITH SIDE-LABELS. Pause 1.
ASSIGN ret = servhdl:DISCONNECT(). DELETE OBJECT servhdl.
QUIT.
The Apps_cli.pf file contains each of the steps to troubleshoot the connection, just one needs to be uncommented at the time:
# Default Asbroker1 test -DirectConnect -H localhost -S 3090 -sessionModel Session-Free
# Default Asbroker1 through NameServer test # -S 5162 -H localhost -AppService asbroker1 -sessionModel Session-Free
# Default AIA test with OpenEdge embedded Tomcat server test # -URL http://localhost:8980/aia/Aia?AppService=asbroker1 -sessionModel Session-Free
# Your production AIA test # -URL http://<Your production test>:<your JSE port>/aia/Aia?AppService=<your AppServer broker name> -sessionModel Session-Free |