Before we start, I am assuming that you have some knowledge of Oracle BI and PowerShell. You can use similar concepts to invoke Web Service using Python, Java, cURL. I will be writing another post on invoking the BI report using Python. This post focuses on a report developed in Oracle Cloud.
You may also read my previous blog on loading data from Oracle Cloud to Oracle EPM. In that post I utilized the ReportService web service. It worked pretty well.
However one of the drawbacks was the fact the user name and password were part of the payload, which is not a good practice.
In this post we will be looking at an alternate Web service; ExternalReportWSSService. As you will see later in the post, the advantage of this web service is that you can pass the authentication details as part of the Request Header. So let’s get started.
At a high level below are the steps involved in the process:
- Read BI login credential details
- Construct the SOAP request Header with authentication values
- Invoke BI Report
- Decode the base64 response and Generate CSV File
Read BI Login Credential Details
Rather than hard coding the username and password, I decided to store the username, password and wsdl end point in a file. This way you have the option of encrypting the username and password at rest. See the loginDetails.json file.
I have included default values for the username and password. Make sure you enter the correct username and password instead of the default values.
Construct the SOAP request Header with Authentication Values
To invoke the BI report we need to pass the encrypted username and password as part of the Web Service Request Header. Here is the code snippet that performs the following operations: