您的位置:首页 > 博客中心 > 数据库 >

Using PL/SQL APIs as Web Services

时间:2022-03-14 02:21

  • Save your work by selecting File > Save All.

  • Invoking REST Service Using a Java Client

    After creating a project with a Java class RestInvocationWithLogin.java, you need to compile and execute the process to invoke the FND_USER_PKG REST service.

    Use the following steps to compile and run the Java class:

    1. In the Application Navigator, right-click on the RestInvocationWithLogin.java Java class you just created at the design time. Select Make from the menu.

    2. Right-click on the RestInvocationWithLogin.java Java class and select Run from the menu.

    Monitor this process and check for successful compilation in the Log window. Verify that the execution is successful in the Log window.

    Viewing Output Message

    When the FND_USER_PKG REST service is successfully invoked, the following output appears:

    • The response from the Login service should be like:

      AOL Token : Name - isgdemo, Value - 5xjE6DVfi7NlEGnS70xX1fvrdt

    • The response from the service invocation should be like:

      Response code - 200
      Response is :
      {
        "OutputParameters" : {
          "@xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance",
          "@xmlns" : "http://xmlns.oracle.com/apps/fnd/rest/fndMessageSvc/testusername/",
          "TESTUSERNAME" : "2"
        }
      }

      In this example, a positive number ‘2‘ is returned indicating that the user name passed in the payload does exist in Oracle E-Business Suite.

      Notice that service alias information fndMessageSvc entered earlier during service deployment appears as part of the service endpoint.

    • The response from the Logout service should be like:

      Response is :
      {
        "data" : {
          "accessToken" : "-1",
          "accessTokenName" : "isgdemo",
          "ebsVersion" : null
        }
      } 

    热门排行

    今日推荐

    热门手游