To expose a PL/SQL package as a service interface, it is mandatory to annotate the package with standard annotation.
Below steps to be followed to expose a PL/SQL package as a REST interface.
- PL/SQL package is annotated with the standard annotation
Preceded package contains a single procedure save_employee_PRC that takes two input parameters. This procedure is used to insert data(c_id and name) into the table.
Note: For PL/SQL packages, only the package spec should be annotated. Do not annotate the body.
- Create a .pls file and paste the above code in the .pls file. Move the .pls file to the EBS server via winscp or putty. In this case we will copy the file at $APPL_TOP/patch/115/sql
- Next step is to create an iLDT file (Integration Repository loader file) that we should use to upload to the Integration Repository. The file is created with a tool called Integration Repository Parser (IREP Parser), the tool will validate the file against the annotation standards.
- Run the below command to generate the iLDT file
- Next is used to upload the generated iLDT file to integration repository. Run below command to upload the iLDT file to integration repository
- Now create the package and package body in the database with the below script
- Now, login into EBS console and Navigate to the Integrated SOA Gateway -> Integration Repository
- Enter the display name(XX_SAVE_EMPLOYEE) in Internal Name and click on Search button
- Select Specific User from the Grantee Type drop down and enter Grantee Name to give access to specific user to execute this service. Click on Create Grant button
- Once done, success message will appear on the screen