In order to run the PeopleSoft sample, follow the instructions
below.
About this task
Before you import the sample:- Make sure you have a clean workspace.
- You need to obtain this file from your PeopleSoft server administrator:
- Install the customer information tables, provided with the sample,
on your PeopleSoft Enterprise system.
After you import the sample:You need to configure the
server and associate the sample with it using the following steps:
Procedure
- If the Java™ EE icon,
, does not appear in the top right tab of the workspace,
you need to switch to the Java EE perspective. From the menu bar, select .
- The Select Perspective window opens. Select Java EE.
- Click OK. The Java EE perspective opens.
- Add required file dependencies:
- psjoa.jar: Drag and drop psjoa.jar from your file system to the connectorModule
folder of the CWYES_PeopleSoft connector project. Add this file to
the classpath. You can do this in the Properties view for the project.
- PSFTCI.jar: Drag and drop PSFTCI.jar from your file system to the connectorModule
folder of the CWYES_PeopleSoft connector project. Add this file to
the classpath. You can do this in the Properties view for the project.
- To associate the sample with your PeopleSoft server, you
need to change the connection information in the Bean implementation
class. Open the CustomerInfoImpl.java in a Java editor, change the following
section in the code to use your PeopleSoft server connection information.
/**
* @j2c.managedConnectionFactory class="com.ibm.j2ca.peoplesoft.PeopleSoftManagedConnectionFactory"
* @j2c.managedConnectionFactory-property name="adapterID" value="001"
* @j2c.managedConnectionFactory-property name="hostName" value="hostname"
* @j2c.managedConnectionFactory-property name="password" value="password"
* @j2c.managedConnectionFactory-property name="pingCompInterface" value="WBI_CUSTOMER_CI"
* @j2c.managedConnectionFactory-property name="port" value="portnumber"
* @j2c.managedConnectionFactory-property name="userName" value="userName"
* @j2c.connectionSpec class="com.ibm.j2ca.peoplesoft.PeopleSoftConnectionSpec"
* @generated
*/
You need to change the following
fields:
- Host name: the name of the PeopleSoft Enterprise host
- Port Number : the port number to use to access the PeopleSoft
system
- User Name : valid user name to access PeopleSoft system
- Password: valid password for the above user. The password
is stored in plain text and therefore it should only be used temporarily
for the sample. For the production deployment, the security alias
mechanism should be used.
- Testing the application:
- Select . Click Next.
- On the J2C Java bean selection page, click Browse.
- On the Find J2C Bean page, Type C in the top text field, and CustomerInfoImpl - customer shows up in the Matching items field. Select CustomerInfoImpl - customer and click OK.
- Click Next.
- On the Deployment Information page, select Simple JSP, and click Next.
- On the Simple JSP Creation page, click New to launch the Web project wizard.
- On the Web Project page, type a name in the Project name field (for example, TestWebProject). Ensure
that Target Runtime selected is WebSphere Application Server
v8.0 or 7.x. Select Add project to an EAR, and click Finish.
- On the Simple JSP Creation page, type a name in the JSP folder field (for example, SampleJSP), and click Finish.
- Select . Right-click on
TestClient.jsp and select .
- The application opens in a web browser. Type this value
in thecustomerid field, and click Invoke:
Results
The output displays in your web browser: