Skip links

Meet Propel Apps at Ascend 2022, Las Vegas. Get a Free POC.

Connect with us

Deploying PLSQL package as REST Service for Oracle EBS Mobile Apps

While creating Ionic Enterprise Mobile App for Oracle EBS, you need to deploy PLSQL packages for the app you are creating as REST Service.

PLSQL Package as REST Service

In this tutorial, i will walk you through the process for deploying PLSQL Package as REST Service.

  1. Firstly, we need to Log in to EBS System as SYSADMINlogin ebs PLSQL Package as REST Service
  2. After logging in, Navigate to Integrated SOA Gateway Responsibility > Integration Repositoryplsql procedures in package oracle navigate I SOA
  3. Click on Search buttonoracle options when compile plsql package
  4. Enter the Package Name in Internal Name field. In this case, the package name is ‘XXALG_SMART_EXP_APPROVAL_PKG’. Enter and Hit on Go.oracle plsql package shared exception block search package
  5. Below Table shows the search result. Click on the Package name from the table.plsql package result
  6. Navigate to REST Web Service Tab. Select the Function/Procedure to deploy. Enter the Service Alias.oracle rest plsql package exception rest service creation
  7. Hit on Deploy button at the bottom of the page.
  8. Once it is deployed, WADL file is created. Click on View WADL link to see WADL file. HTTP Method to access this Service is also described here.http rest web service

Create Grants

  1. Now, we have to create Grants to give access to use this service.
  2. Navigate to Grants Tab, Check the Function / Procedure name and click on create grant button.create grants
  3. You will be prompted to select Grantee Type, you can choose
    • All Users
    • Specific User
    • Group of Usersgrantee type selection
  4. Click on Create Grant button at the top of the page.create grants
  5. When grant is created, this icon appears for the function / procedure.grant functions
  6. From the WADL file, we have to construct REST Service URL. Extract the base URL and append the resource path to it.wadl resources REST Servicewadl resources Rest service
  7. The below link is our final REST Service URL. https://vis1225.dpebserver.com:8000/webservices/rest/Smart_Expense_Approval/get_smart_exp_cnt_p/
  8. Once the url is extracted, Test the REST Service to make sure the deployment is perfect.

Test the REST Service

postman rest service checkNow, We will Test the Service in any REST Client like POSTMAN just to make sure everything is perfect. POSTMAN is a browser extension you can use on Chrome.

  1. Open POSTMAN. Add the following Headers under headers tab.adding new procedure for oracle package in plsql developer
  2. Construct the payload according to XSD from WADL file. Select the Method as POST in POSTMAN.
  3. Payload:
    {“Smart_Expense_Approval”:
    {
    “@xmlns”:”https://vis1225.dpebs-server.com:8000/webservices/rest/Smart_Expense_Approval/get_smart_exp_cnt_p”,
    “RESTHeader”:
    {
    “xmlns”: “https://vis1225.dpebs-server.com:8000/webservices/rest/Smart_Expense_Approval/header”,
    “Responsibility”:”SYSTEM_ADMINISTRATOR”,
    “RespApplication”:”SYSADMIN”,
    “SecurityGroup”:”STANDARD”,
    “NLSLanguage”:”AMERICAN”,
    “Org_Id” :”204″
    },
    “InputParameters”:
    {
    “P_USER_NAME”: “MICHAEL”
    }
    }
    }postman code payload oracle plsql package example
  4. Once you click on send, the result appears. Status Code 200 is a success.

rest service success oracle plsql package body declare section

If you are looking to build mobile apps with Oracle Mobile Cloud Service, our End to End Guide on developing an Oracle EBS based mobile app in Ionic frame work.

The document portrays a scenario of our Smart Expense Approval App for EBS using Integrated SOA as gate way and Oracle Mobile Cloud Services as middle ware.