Let's first create a sample report that we will be calling from SOAP UI. This report will return Code Combination Id for given segment values:
- Login to Oracle Fusion Catalog by using the URL: https://<hostname>.oraclecloud.com/analytics
- Click on Catalog link to go to catalog
- There are two folders in Catalog:
- My Folders - This is private to logged in user only
- Shared Folders - This is available to all the users having BI Access. We create our custom reports in /Shared Folders/Custom folder only.
- Click Create -> Data Model to create new Data Model. Data Model is the source of the data for the BIP Report.
- Enter the Name as Q1, select Data Source as ApplicationDB_FSCM and Type of SQL: Standard SQL
SELECT vendor_id,
vendor_name,
segment1 vendor_number
FROM poz_suppliers_v
WHERE segment1 = :p_vendor_number
- Select the bind parameter
- Change the Display Label as Vendor Number. Note that parameter name is p_vendor_number
- Change the below properties of Data Model:
Include Parameter Tags as false
- Go to Data Tab and click on view button after entering the Vendor Number in the text box and then click on Save as Sample Data:
- Save the data model.
- Click on Create Report and select "Use Report Editor" and click Finish button
- Click on Generate RTF layout based on selected Data Model. and give it a name
- Click on View a list:
- In Output Formats, choose only Data (CSV) and click on save button
- Report is ready now. Click on Schedule and copy the report location (/Custom/Sample/TestReport.xdo)
- Now to call the report from SOAP UI we need external report service WSDL URL (https://<hostname>.oraclecloud.com/xmlpserver/services/ExternalReportWSSService?WSDL)
- Click on Create new SOAP project
- Enter Project Name and give the WSDL URL and click OK
- We will use runReport operation of this service
- Double click on Request 1 to open it
- Use the below body for Request Envelope
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:attributeFormat>csv</pub:attributeFormat>
<pub:parameterNameValues>
<!--Zero or more repetitions:-->
<pub:item>
<pub:name>p_vendor_number</pub:name>
<pub:values>
<!--Zero or more repetitions:-->
<pub:item>1000401</pub:item>
</pub:values>
</pub:item>
</pub:parameterNameValues>
<pub:reportAbsolutePath>/Custom/Sample/TestReport.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
</soap:Body>
</soap:Envelope>
- In case you have multiple parameters you can use the below
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:attributeFormat>csv</pub:attributeFormat>
<pub:parameterNameValues>
<pub:item>
<pub:name>param1</pub:name>
<pub:values>
<pub:item>value1</pub:item>
</pub:values>
</pub:item>
<pub:item>
<pub:name>param2</pub:name>
<pub:values>
<pub:item>value2</pub:item>
</pub:values>
</pub:item>
</pub:parameterNameValues>
<pub:reportAbsolutePath>/Custom/Sample/TestReport.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
</soap:Body>
</soap:Envelope>
- Go to Auth and Add New Authorization:
- Select Type as Basic
- Enter Username and Password:
- Click on Run button
- Response will be displayed in right side:
- Copy the reportBytes and decode it from https://www.base64decode.org/
Comments
Post a Comment