The csouidpwd.properties file contains
authentication details needed for a remote call from a Java™ service.
You must create and provide access to the
csouidpwd.properties file
when all of the following conditions are true:
- First, one of the following conditions is true:
- The linkage options part, callLink element, property remoteComType is
set to JAVA400, JAVA400J2C, CICSJ2C, or CICSECI; or
- The deployment descriptor entry (service client binding) references
one of those protocols ( JAVA400, JAVA400J2C, CICSJ2C, or CICSECI),
as is possible for accessing an EGL service or for accessing an IBM® i service program by way of
a native binding; or
- The deployment descriptor entry (service client binding) references
a Web service.
- Second, a user ID and password are required. (In the case of JAVA400J2C,
the user ID and password are usually handled by the application server;
but if you specify userID and password here, the values you specify
takes precedence over any specified for the application server.
In
general, the order of precedence for different sources of security
credentials is the EGL deployment descriptor (for service access), sysLib.setRemoteUser(), csouidpwd.properties,
and (for access by JAVA400J2C), the application server.
- Third, one of the following cases applies:
- The call is made from a Java program,
but the code does not first invoke the system function sysLib.setRemoteUser() with
values other than blanks.
- The call is made from a Java wrapper,
but the Java code that includes
that wrapper has not invoked the CSOCallOptions methods setUserId() and setPassword() with
values other than blanks.
If the invocation of sysLib.setRemoteUser() (or
the invocation of the appropriate CSOCallOptions method) results in
a blank user ID or password, EGL looks for the information in csouidpwd.properties.
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.