Testing the People Soft Connection
The pscitester program can be used to test the connection
to the PeopleTools Application Server. Pscitester is a PeopleSoft sample
program that is supplied as a Java source. It is found in %PS_HOME%/sdk/PSCOMPINTFC/src/java/samples.
You can test it using this example if People Soft can be accessed with the Java Object Adapter.
The building and testing process of this example program is described
below.
Procedure
|
1.
|
Installing the Java SDK
|
- Host
- Install the Java SDK on a work station (can also be another one
than the PeopleSoft server).
|
2.
|
Adjusting the PATH Variable |
- Add the bin directory <SDK_HOME>\bin
to the PATH environment variable. Enter "javac" in the MS DOS
prompt or the terminal to test if the installation was completed successfully.
Javac is output.
|
3.
|
Generating the Java Sources |
- Select a Component Interface in the Application
Designer and click Build -> PeopleSoft APIs. The Java classes that should
be build can be selected now:
CompIntfc.USER_PROFILE
CompIntfc.USER_PROFILE_IDTypes
CompIntfc.USER_PROFILE_IDTypesCollection
CompIntfc.USER_PROFILE_Roles
CompIntfc.USER_PROFILE_RolesCollection
CompIntfc.USER_PROFILE_Roles_RouteControls
CompIntfc.USER_PROFILE_Roles_RouteControlsCollection
CompIntfc.USER_PROFILE_Attributes
CompIntfc.USER_PROFILE_AttributesCollection
CompIntfc.USER_PROFILE_SYNC
CompIntfc.USER_PROFILE_SYNCCollection
CompIntfc.USER_PROFILE_Collection
CompIntfc.CompIntfcPropertyInfo
CompIntfc.CompIntfcPropertyInfoCollection
- Deactivate the checkbox for COM Type Library generation
and select a folder in the field Java classes in which the files can be
generated. The Java files are generated in a selectable directory
in PeopleSoft/Generated/CompIntfc.
|
4.
|
Creating the *.class Files |
- Create a folder and copy the file psjoa.jar, the
directory pscitester and the directory PeopleSoft to it. The PeopleSoft
directory was specified while you created the Java classes. The directory
is structured as follows:
./psjoa.jar
./pscitester/pscitester.java
./PeopleSoft/Generated/CompIntfc/CompIntfcPropertyInfo.java
./PeopleSoft/Generated/CompIntfc/CompIntfcPropertyInfoCollection.java
./PeopleSoft/Generated/CompIntfc/ICompIntfcPropertyInfo.java
./PeopleSoft/Generated/CompIntfc/ICompIntfcPropertyInfoCollection.java
./PeopleSoft/Generated/CompIntfc/IUserProfile.java
./PeopleSoft/Generated/CompIntfc/IUserProfileIdtypes.java
./PeopleSoft/Generated/CompIntfc/IUserProfileIdtypesAttributes.java
./PeopleSoft/Generated/CompIntfc/IUserProfileIdtypesAttributesCollection.java
./PeopleSoft/Generated/CompIntfc/IUserProfileIdtypesCollection.java
./PeopleSoft/Generated/CompIntfc/IUserProfileRoles.java
./PeopleSoft/Generated/CompIntfc/IUserProfileRolesCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfile.java
./PeopleSoft/Generated/CompIntfc/UserProfileIdtypes.java
./PeopleSoft/Generated/CompIntfc/UserProfileIdtypesAttributes.java
./PeopleSoft/Generated/CompIntfc/UserProfileIdtypesAttributesCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfileIdtypesCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfileRoles.java
./PeopleSoft/Generated/CompIntfc/UserProfileRolesCollection.java
./PeopleSoft/Generated/CompIntfc/IUserProfileRolesRoutecontrols.java
./PeopleSoft/Generated/CompIntfc/IUserProfileRolesRoutecontrolsCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfileRolesRoutecontrols.java
./PeopleSoft/Generated/CompIntfc/UserProfileRolesRoutecontrolsCollection.java
./PeopleSoft/Generated/CompIntfc/IUserProfileCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfileCollection.java
./PeopleSoft/Generated/CompIntfc/UserProfileSync.java
./PeopleSoft/Generated/CompIntfc/UserProfileSyncCollection.java
- Change to this directory by using the MS DOS prompt
or the terminal and set the CLASSPATH:
For Windows: set CLASSPATH=.;psjoa.jar
For Unix: export CLASSPATH=psjoa.jar:.
- Transmit the example with:
javac pscitester/pscitester.java
|
5.
|
Starting the Pscitester Program |
- Required is a running Application Server to which
the program can connect.
- Enter the JOLT port in the test program. It is
found in the file %PS_HOME%\APPSERV\<APPSERVERNAME>\psappsrv.cfg
under [JOLT Listener].
- Start the program:
java pscitester.pscitester
The following error message can be ignored:
java.lang.NullPointerException: PSProperties not loaded from file.
If this message should not be displayed,
copy the file pstools.properties from the PeopleSoft server to the current
directory.
- The following output displays if all entries were made correctly:
Application Server Connect Information...
Enter The Application Server Name: wgw2ksps2
Enter The Application Server Port Number[ 9000]:
Enter PeopleSoft UserID [PTDMO]: PS
Enter PeopleSoft UserID Password: [PTDMO]: ********
Connected to Appserver...
Get on Component Interface "USER_PROFILE" succeeded
Listing Component Interface property for field "UserID"
Long Label: User ID
Short Label: User
Is Collection: false
Type: 0
Format: 6
Is Key: true
Is Required: false
Is Xlat: false
Is YesNo: false
Is Prompt: false