Testing the SSL scenario

To complete this task you set the Java CLASSPATH environment variable, then issue a Java command that invokes the EciB1 sample application to send an ECI request to CICS.

Set the Java CLASSPATH variable

The Java™ CLASSPATH environment variable identifies the location of the ctgclient.jar and ctgsamples.jar files.

  1. Open a command prompt window and change to the directory where the Java keystore file is located.
  2. Set the Java CLASSPATH environment variable with the set CLASSPATH or export CLASSPATH command, for example:
    • On UNIX and Linux:
      export CLASSPATH=<install_path>/classes/ctgclient.jar:<install_path>/classes/ctgsamples.jar:$CLASSPATH 
    • On Windows:
      set CLASSPATH=<install_path>\classes\ctgclient.jar;<install_path>\classes\ctgsamples.jar;%CLASSPATH%

Send an ECI request to CICS

To send an ECI request to CICS you issue a Java command that calls the EciB1 sample application, specifying the ssl:// protocol. When you do this the Java client and the Gateway daemon attempt an SSL handshake. If server authentication is successful, and if client authentication (if configured) is successful, the Gateway daemon lists the available CICS® servers. You then select the CICS server. The CICS application EC01 then confirms the request by returning the current date and time.

The source for the sample EciB1 is located in the samples folder:

On UNIX and Linux:

/opt/ibm/cicstg/samples/java/com/ibm/ctg/samples/eci

On Windows:

C:\Program Files\IBM\CICS Transaction Gateway\samples\java\com\ibm\ctg\samples\eci
  1. Start CICS Transaction Gateway from a command line prompt:
    ctgadmin -a start
  2. Enter the Java command that calls the EciB1 sample application using the following format:
    java com.ibm.ctg.samples.eci.EciB1 ssl://Gateway_URL 
    Gateway_port_number jks_filename jks_password 
    For example:
    java com.ibm.ctg.samples.eci.EciB1 ssl://cicssrv1.company.com 8573 MyClient.jks MyPassword
    CICS Transaction Gateway returns details of the available CICS servers, for example:
    CICS Servers Defined:
    
             1. CICSA -CICS V4.1 Server
                      
    Choose Server to connect to, or q to quit:
  3. Enter the number of the CICS server where you want to send the ECI request.
The specified CICS server returns the current date and time, for example:
Program EC01 returned with data:-

        Hex: 32382f30312f31302031353a33323a34360
        ASCII text: 28/01/10 15:32:46
You have now completed the scenario.

Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//ctgunx/sc06_test_test.html