Sample Oracle Fusion Web Services Book Sample
Sample Oracle Fusion Web Services Book Sample
&
INTEGRATION BOOK
List of Topics
Here below we will try to explain all about the REST API WebService. Oracle has given the hundreds of REST API for
different operations in oracle fusion application.
In this Example, I’m trying to explain About AR Invoice Rest API. Oracle has given the REST API for Receivables Invoices
(AR) Invoices.
Here below , We can see that Each REST API WebService uses for different operations. For AR Invoice REST API , We can
use this REST API to create AR Invoice, To Delete the AR Invoice, To Extract the AR Invoice Data , To Update the
Receivable Invoice data from other third party application.
You can find the Rest API in Google search engine from Oracle website.
As below, Each REST API has different methods. We do execute the REST API using these methods.
For Example, If we are using the REST API to create AR Invoice ,we do use ‘POST’ method.
If we are using the REST API to Delete a AR Invoice, We do use ‘DELETE’ method. Delete method is not available for each
REST API as some time delete not allowed once transaction got created.
If we are using the REST API to Extract the AR Invoice Data, then we do use the ‘GET” method.
If we are using the REST API to Update the AR Invoice Data , then we do use the ‘PATCH’ method.
Important Note: Once more things, we need to understand whatever the standard functionality we have in Oracle Fusion
application while working manually in the Application, only those flexibility and operations we can perform through REST
API’s too. For Example: In Front Fusion application too, Once AR Invoice got created, we cannot update each and every
about AR Invoice. In the same way, we can only update those fields/columns through REST API, which we have the
flexibility from front end.
Create a Receivables Invoice:-
This is the First Method of AR Invoice REST API. It’s showing the Method ‘POST’. For creation, REST API always uses the
POST method.
As highlighted below, ‘/fscmRestApi/resources/11.13.18.05/receivablesInvoices’ is the url of AR Invoice Rest API to
create the AR Invoice. This is very important url. We need to use this url to access this Webservice from third party
application.
Request(Supported Media Types): It shows, in which format this REST API sends data. It has json format.
For Example , Here below , We can see that to Create AR Invoice , we can send AR Invoice Information’s using these
columns, so it will be Map in to the Oracle Fusion Standard AR Invoice tables.
For example , Here below Accounting Date, Billing Date, Bill to Customer Number, Bill to Custom Name etc. information’s we
get as an response in REST API.
In Default Response section, We get to know that , when AR Invoice Got created in Oracle Fusion using this REST API ,
then REST API sends which information’s back to the third party application as an response. It’s more like Data base
function, when we execution completed it returns some information’s. In REST API, It sends back the AR Invoice columns
details, so that we can use this response to capture the created AR Invoice data in the Third party application for future
reference.
For example , Here below Accounting Date, Billing Date, Bill to Customer Number, Bill to Custom Name etc. information’s we
get as an response in REST API.
What is Request Payload in Oracle Fusion?
In Oracle Fusion Rest API, if we want to INSERT or Create the Record then We need to use the Request Payload. Request
Payload is more like the Insert script in Interfaces.
Request Payload is the Format in which we need to prepare the Data which we want to Create using Rest API In Oracle
Fusion application. Request Payload is the Insert Script of Rest API. Oracle Fusion has provided the Request Payload
syntax for provided REST API. We Just need to Follow that Payload if we want to Perform INSERT/CREATE operation in
Oracle Fusion Application using REST API.
What is Request Response in Oracle Fusion?
Request Response is the Output Format for the Oracle Fusion REST API. Request Response is more similar like the Out
Parameters for the Procedure which helps to get the Procedure response back. In the Same Way, when we execute the
Rest API Using POST, PATCH, GET methods, we get the response back from Oracle Fusion application. This is called
Request Response. Oracle Fusion has provided the Request Response sample/Syntax for each REST API provided. We
can use the Request Response to see the Output values and format for that service.
Here Below, we can see, When We Execute the REST API to create the AR Invoice, Here below is the Response we are
getting back. In this We can see, We are getting the Customer Transaction ID for the AR Invoice Create, Due Date, Currency
and other Invoice related information’s.
What is finder in Oracle Fusion Rest API get Service?
Finder is one the Parameter of Rest API WebService. We know that , We have 3 types of methods in REST API’s and that Is
called POST,PATCH,GET. GET is basically used to extract the Data from Oracle Fusion Application.
In GET method, we have 2 REST API’s. First Rest API for Get is used to extract only the Single record in which we need to
pass the Transaction id.
The Second REST API for Get is used to Extract multiple records in Oracle fusion Application.
For Example, if we are using the AR Invoice Rest API , then this second type of GET Method will help to extract all AR
Invoices data.
In this GET Rest API, We do use the Finder. Finder is just a filter, which we can use in the Rest API so that based on that
Rest API GET method will extract the data. Like If we will use the ‘BillToCustomerNumber’ as a finder then GET Rest API
will only extract the AR Invoice data only for this Customer.
As below When we click on the finder , If shows the columns which we can use under the finder. We can use more than one
filter under GET Rest API. Like ‘BillToCustomerNumber’ & ‘BussinessUnit’.
What is SOAP UI and why it’s so usefully in Oracle Fusion WebServices?
SOAP UI is the tool which is used to test and execute the WebServices. We should test our REST API or SOAP API in the
SOAP UI before using directly in Oracle Fusion application. This is excellent tool, We can test our REST API’s first in this
SOAP UI and prepare the Request Payload and other scripts and test this scripts in the SOAP API itself before using in the
Oracle Fusion application.
It’s always recommended, if you are using and registering the REST API or SOAP API WebService in Oracle Fusion
application then you first need to test and execute the REST API or SOAP API in the SOAP UI.
It helps to ensure that, REST API is working fine and which Request Payload we need to use and what’s the REST API
Request response information’s & columns details.
Step 1:- We need to first download the SOAP UI tool from Internet. It’s a freeware tool.
Step 2:- For Example, We are going to test the ‘Create a Receivables Invoice’ REST API method in SOAP UI.
Step 3:- To use any Rest API, We need two things.
1. Application URL.
2. REST API URL.
https://cloudurl.test.com/fscmRestApi/resources/11.13.18.05/receivablesInvoices
Steps to Create the AR Invoice through Rest API in Oracle Fusion using SOAP UI
Step 1:- We will test the AR Invoice Rest API through Empty Project.
Step 2:- Select the Rename option , to provide the new name of the SOAP Project.
Step 3:- As below , I have given the name ‘AR Invoice REST API’ for this project.
Step 4- Now again right click on the AR Invoice Rest API project ➔ New REST Service from URI.
Step 5:- Here we need to enter the url which we prepared in initial steps (Cloud Application url+ REST API url).
Enter this url and Click Ok button.
https://cloudurl.test.com/fscmRestApi/resources/11.13.18.05/receivablesInvoices
Step 7:- As , we testing the Create AR Invoice REST API WebService , we need to select the Method ‘POST’ as below.
----- To be continued in the book
How to create the Web service in the Application Composer and use the web
service the Oracle Fusion Custom Pages to insert, update or delete the Data
Step 1:- First of all we need to create/Register the Web Service. We will register the Create AR Invoice REST API Web service
provided by Oracle Fusion to create the AR Invoice.
Go to Application Composer ➔ Web Services ➔ Click on the ‘+’ icon to create the Web Service.
Select ‘REST’ as a Connection Type as we are creating this Web service for AR Invoice Rest API.
Here below we have given the Request Payload Sample value for the AR Invoice Create WebService.
Click Save and Close, Our web service has now created. Now we will use this Web service in the Custom Page or under
Object function to create the AR Invoice in Oracle Fusion Application
Here Below we have created the Object Function ‘Create_ar_invoice’ under this Function we have put the Groovy code to Create
the AR Invoice using the webservice ‘create_ar_invoice’.
----- To be Continued