Skip Headers
Oracle® Application Server Adapter for PeopleSoft User's Guide
10g Release 2 (10.1.2)
B14060-03
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

A Generating Component Interface APIs

This section describes how to generate component interface APIs to use with Oracle Application Server Adapter for PeopleSoft.

Building the PeopleSoft API Java Programs

Whether you are using an Enterprise Integration Point (EIP) supplied by PeopleSoft or a customized component interface, you must create a PeopleSoft API to enable communications with the PeopleSoft application. The API is a collection of Java class files that reside on the client machine and mediate between the client application layer and PeopleSoft.

Before using your component interface, you must apply security to it and test it.

To build a PeopleSoft API Java program:

  1. Open the PeopleSoft Application Designer. PeopleSoft Application Designer
    Description of the illustration bea_pstu_buildjava_1.gif

  2. From the PeopleSoft Application Designer, open a component interface.

  3. Click the right pane and select PeopleSoft APIs from the Build menu.

    The Build PeopleSoft API Bindings dialog box prompts you for the types of bindings to create.

    Build PeopleSoft API Bindings dialog box
    Description of the illustration bea_pstu_buildjava_2.gif

  4. Because you are creating Java files, ensure you deselect COM Type Library Build.

  5. Ensure that Java Classes Build is selected, and then select a directory on your local machine where the Java files are to be placed, for example, c:\psoft8_components.

    • To build all API files, select the default, All (potentially a large number), and click OK.

      PeopleSoft generates the files. This takes a few minutes. After the process is complete, a message appears in the output window.

      You are now ready to compile the Java files. See "Compiling the PeopleSoft API Java Programs" for more information.

      The following pane illustrates the GP_PYE_ERN_DED_ASGN component interface from the HR 8.1 application. GP_PYE_ERN_DED_ASGN component interface
      Description of the illustration bea_pstu_buildjava_3.gif

    • To create APIs for a specific component interface or interfaces, click None.

      This clears the selected APIs, so you can select the appropriate APIs for your component interface. These APIs begin with the name of your component interface. There may be fewer than five, or more than 50 APIs, for a particular component interface.

      The following dialog box displays the following APIs, including generic component interface properties.

      APIs
      Description of the illustration bea_pstu_buildjava_4.gif

    1. In addition to the APIs for the selected component interface, you also must generate the API files for the following generic component interface properties:

      CompIntfcPropertyInfo

      CompIntfcPropertyInfoCollection

      You may select these items in the same step as the component interface build, or you may select them separately.

    2. Click OK.

      PeopleSoft generates the files. This takes a few minutes. After the process is complete, a message appears in the output window. You are now ready to compile the Java files. See "Compiling the PeopleSoft API Java Programs" for more information.

Compiling the PeopleSoft API Java Programs

PeopleSoft places the Java programs to compile in the directory called psoft8_components\PeopleSoft\Generated\CompIntfc.

Where psoft8_components is the directory specified during the build process.

If you chose to generate all APIs, the systems creates a second directory, psoft8_components\PeopleSoft\Generated\PeopleSoft. You are not required to access it.

The process for compiling the PeopleSoft API Java programs depends on whether you are compiling on the machine where you installed Application Explorer or on another machine.


Note:

There are two Java programs for every API file that you selected when you built the Java programs. See "Building the PeopleSoft API Java Programs" for more information.

Before you compile the Java programs, you require the PeopleSoft Java Object Adapter, the psjoa.jar file that resides on your PeopleSoft Application Server under the PS_HOME\Web\psjoa directory. This is the file that you placed in the adapter lib directory during installation.

If you are compiling on the same machine where you installed Application Explorer

Point to the psjoa.jar file or copy it to the directory where you placed the Java API files, for example, c:\psoft8_components.

If you are compiling on a machine other than the one where you installed Application Explorer

Perform the following steps:

  1. Obtain a copy of the psjoa.jar file from the PeopleSoft Application Server. Ensure that the psjoa.jar file is in the Java class path before you compile the programs.

  2. Compile the Java programs and ensure that you include the \PeopleSoft\Generated\CompIntfc path.

    The path is case-sensitive.

    The following Windows batch file, run from the psoft8_components directory, properly compiles the Java APIs. The code assumes that psjoa.jar was placed in psoft8_components.

    @echo off
    set JAVA_HOME=<my-java-home>
    set PATH=%JAVA_HOME%\bin;%PATH%
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar;psjoa.jar;%CLASSPATH%
    javac -classpath %CLASSPATH% .\PeopleSoft\Generated\CompIntfc\*.java
    
    

    Where <my-java-home> is the fully qualified path name of your Java home directory.

    This code places the class files in the same directory with the Java files, but you can choose a different location depending on your site requirements.

  1. Compress the class files into a JAR file.

    The following Windows batch file, if run from the psoft8_components directory, creates a correct JAR file:

    @echo offset JAVA_HOME= my-java-homeset PATH=%JAVA_HOME%\bin;%PATH%
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
    jar cvf my-jar-file.jar .\PeopleSoft\Generated\CompIntfc\*.class
    
    

    Where appropriate, substitutions are made for my-java-home and my-jar-file.

  2. To verify that your JAR file is correct, open it with the WinZip application. WinZip
    Description of the illustration iway_pstu_winzip.gif

    If the JAR file does not use the case-sensitive PeopleSoft\Generated\CompIntfc\ path, you must go back and correct it.

  3. Place the JAR file in the adapters common lib directory. This enables the OracleAS Adapter for PeopleSoft to communicate with the PeopleSoft component interface.

    OracleAS_home\adapters\application\lib
    
    

Note:

If you are running on UNIX, do the compile and JAR steps on Windows and then move the file to your UNIX machine. The JAR file is binary. If you use an FTP-based tool to move your JAR file from Windows to UNIX, the file format must be set to binary.