This topic outlines the steps to create and run the complete
Oracle EBS native API application.
Procedure
- Select .
- Select J2C bean, and click Next.
- On the Resource Adapter Selection page, select , and click Next.
- On the Connector Setting page, beside the Oracle JDBC driver
field, click Add. Browse to the directory on
your file system where ojdbc6.jar is located and
click Open. Click Next.
- On the Adapter Style page, click Outbound, and click Next.
- On the Discovery Configuration page, provide the values
for your connection to the Oracle connection, and click Next.
- In the JDCB driver type field, select Oracle
Thin Driver
- In the System ID field, type your system
id.
- In the Host name field, type the url or
IP address of your database.
- In the Port number field, type your port
number.
- In the User name field, type your username.
- In the Password field, type your password.
- In the Object Discovery and Selection page, click Edit Query. In the Query Filter Parameter page:
- In the Schema name or pattern field, type APPS.
- In the Supported database object types field, press CTRL + select Tables, Views, and Synonyms - Nick Names, and click Remove.
- Select Prompt for additional configuration
settings when adding business object, and click OK.
Click Execute Query. In the Objects discovered by query field, select , Without expanding Stored Procedures, click Create or edit filter:- In the Filter Properties for 'Stored Procedures'
page, in the Object name or pattern field,
type EXECUTABLE, and click OK.
- Expand Stored Procedures subcategory.
Because of the large number of procedures contained in the APPS schema,
it may take a long time for the adapter to return the list of Stored
Procedures.
- Select EXECUTABLE(FND_PROGRAM) from the list of stored procedures, and click Add selected
discovered objects to selected objects, and the Configuration
Parameters for EXECUTABLE(FND_PROGRAM) page appears. Click OK, and on the Object Discovery and Selection page, click Next.
- On the Configure Composite Properties page, use the default
namespace in the Business object namespace field
and in the Specify the relative folder for generated business
objects field, type a name for the folder where you want
the generated business objects to be stored, and click Next.
- In the New J2C page,
- beside the Project name field,
click New.
- On the New Source Project Creation page, select Java
project, and click Next
- On the Create a Java™ Project
page, in the Project name field, type NativeAPI, and click Next.
- On the Java Settings page,
click Finish.
- In the Package name field, type nativeapi.executable.
- In the Interface field, type EBSAPI.
- In the Implementation field, In the Implementation field,
accept the default value EBSAPIImpl, or type
an implementation name.
- In the Connection properties field, clear Managed connection and select Non-managed
connection. In the database connection information field,
select Specify local database connection information, and click Finish.
The following projects have been added to your workspace:
- Right-click the NativeAPI project and select . On the Java package page,
in the Namefield, type client, and click Finish.
- Right-click the client package that you just created, and
select . On the Java Class
page, in the Name field, type ApplicationClient and click Finish. Right-click the ApplicationClient class and select . Select all the code, and replace it with this:
package client;
import javax.resource.ResourceException;
import com.ibm.xmlns.prod.websphere.j2ca.oracle.appsfnd_programu46executable.AppsFnd_ProgramU46executable;
import nativeapi.executable.EBSAPI;
import nativeapi.executable.EBSAPIImpl;
public class ApplicationClient {
public static void main(String[] args) {
try { // Create input instance of java data binding
AppsFnd_ProgramU46executable inputData = new AppsFnd_ProgramU46executable();
// Create output instance of java data binding
AppsFnd_ProgramU46executable outputData = null;
// Populate input data
inputData.setapplication("AR");
inputData.setexecutable("IBMSAMPLENAME1");
inputData.setexecution_file_name("TEST_PACKAGE.TEST_PROCEDURE");
inputData.setexecution_method("PL/SQL Stored Procedure");
inputData.setlanguage_code("US");
inputData.setshort_name("IBMSAMPLENAME1");
// Create instance of the J2C Java Bean
EBSAPI storedProcedure = new EBSAPIImpl();
// Invoke executable program using adapter
outputData = storedProcedure.executeAppsFnd_ProgramU46executable(inputData);
// Print returned subroutine name
if(outputData != null)
System.out.println(outputData.getsubroutine_name());
}
catch (ResourceException e) {
System.out.println("Exception during execution: " + e.getMessage());
}
}
}
- Press CNTR + S to save.
Results
Running the ApplicationClient class:
Right-click the ApplicationClient class,
and select .
Verify the results using
the Oracle EBS web client:
- Log in to Oracle E-Business Suite and select the System Administration
responsibility.
- Select .
- From the Create Concurrent Program, type IBMSAMPLENAME1 in the Name field of Executable tab.
- Run the query.