When calling remote logic from EGL-generated Java™ code, you can specify the security credentials—a
userid and password— in several ways.
Here are several possible sources of the credentials, in order
of decreasing precedence:
- If you are accessing a service with protocol JAVA400, JAVA400J2C,
or CICSWS, you can specify the user ID in the EGL deployment descriptor;
and for JAVA400 and JAVA400J2C, you can also specify the password
in the EGL deployment descriptor
- The following are mutually exclusive:
- If you are invoking code from an EGL-generated Java program, library, service, or JSF handler,
you can specify the security credentials in sysLib.setRemoteUser().
- If you are invoking code from an EGL Java wrapper,
you can specify the CSOCallOptions methods setUserId() and setPassword().
- You can set the credentials in the file csouidpwd.properties,
as explained later in this topic
- If you are using the protocol JAVA400J2C cor CICSJ2C, you can
set the credentials in the J2C Connection Factory settings defined
to the application server
csouidpwd.properties
The csouidpwd.properties file contains authentication
details needed for a remote call from a Java program,
library, service, or JSF handler. The EGL Runtime looks for information
in that file if you have not provided authentication in a way that
takes precedence, as described earlier.
Your task is as follows:
- Create the csouidpwd.properties file, which
can contain property settings that are formatted as follows, each
on a separate line:
- CSOUID=userid
- userid is the user ID for the remote call
- CSOPWD=password
- password is the password for the remote call
- Ensure that the file is a directory that is referenced by the
classpath. An appropriate directory is your project's JavaSource folder.