You can setup a secure AS/400 connection by creating an instance of a SecureAS400() object with or without prompting the user for sign-on information as indicated below:
The following example shows you how to use CommandCall to send commands to the AS/400 system using a secure connection:
// Create a secure AS400 object. This is the only statement that changes // from the non-SSL case. SecureAS400 sys = new SecureAS400("mySystem.myCompany.com"); // Create a command call object CommandCall cmd = new CommandCall(sys, "myCommand"); // Run the commands. A secure connection is made when the // command is run. All the information that passes between the // client and server is encrypted. cmd.run();
For more information, see secure sockets layer.