Oracle adapter native API calls sample setup instructions

You can use the imported sample to create an application that uses the Oracle adapter to connect to an Oracle E-Business Suite API directly.

About this task

Database and application user account requirements
To use the samples, you must use a database account that gives you rights to the artifacts needed to run the sample content, and use an Oracle E-Business Suite account that allows you to perform responsibilities of the system administrator and receivables manager. For the purposes of this sample, the user account running all scripts is assumed to be the APPS user for the Oracle database. This user has the following rights:
  • To change and create content in the APPS schema
  • To add and remove data from tables
  • To run the required executables in the APPS schema
Oracle E-Business Suite requires you to have an account with rights to the following responsibilities:
  • System administrator
  • Receivables Manager
Note: If the Oracle E-Business Suite account that you are using does not have access to these responsibilities, they can be added. To change the responsibilities assigned to the account you will use, log onto an account that has System Administrator responsibility rights and go to the Security > User > Define menu option. For specific information about changing user responsibilities, refer to your documentation for Oracle Applications.

Procedure

  1. After you import the sample, the project appears in the Enterprise Explorer view of your workspace:
    sample import
  2. Now you must add the required external jars to the connector project. Add the files to the project using the build path configuration. In the Enterprise Explorer view, right-click the NativeAPI project, and select Properties. On the Properties page, select Java Build Path and then select Libraries. Click Add External Jars.
    1. Navigate to the location of the Oracle driver in your workspace directory, select CWYOE_OracleEBS.jar, click Open and then OK.
    2. Navigate to the directory where you WebSphere® Application Server is, and expand WebSphere > AppServer > runtimes . Select com.ibm.ws.admin.client_<version>.jar, click Open and then OK.
    3. You need to obtain this file from your Oracle server administrator: ojdbc.jar. Navigate to the location of the ojdbc.jar file in your file directory, select ojdbc.jar, click Open and then OK.
  3. Expand NativeAPI > src > nativeapi.executable , and select EBSAPIImpl.java. Right-click EBSAPIImpl.java and select Open With > Java Editor. Edit the annotations pointing your Oracle EBS system. You must provide the following information:
    /**
     * @j2c.managedConnectionFactory class="com.ibm.j2ca.oracleebs.runtime.OracleManagedConnectionFactory"
     * @j2c.managedConnectionFactory-property name="XADataSourceName" value="oracle.jdbc.xa.client.OracleXADataSource"
     * @j2c.managedConnectionFactory-property name="adapterID" value="001"
     * @j2c.managedConnectionFactory-property name="autoCommit" value="true"
     * @j2c.managedConnectionFactory-property name="connectionType" value="LocalConnectionProps"
     * @j2c.managedConnectionFactory-property name="databaseURL" value="jdbc:oracle:thin:@my_host:1521:my_database"
     * @j2c.managedConnectionFactory-property name="databaseVendor" value="ORACLE"
     * @j2c.managedConnectionFactory-property name="jdbcDriverClass" value="oracle.jdbc.driver.OracleDriver"
     * @j2c.managedConnectionFactory-property name="password" value="password"
     * @j2c.managedConnectionFactory-property name="returnDummyBOForSP" value="false"
     * @j2c.managedConnectionFactory-property name="userName" value="user"
     * @j2c.connectionSpec class="com.ibm.j2ca.oracleebs.runtime.OracleConnectionSpec"
     * @generated
     */
    • Database URL: the database URL string
    • User Name: valid user name to access OracleEBS system
    • Password: valid password for the 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.

    Press CTRL+S to save the file.

  4. Right-click client > ApplicationClient.java file, and select Run As > Java Application.

Results

Verify the results using the Oracle EBS web client:

Feedback