In this section, we will see how to call BIP report using SOAP Webservice.
Oracle provided a SOAP web service ExternalReportWSSService with “runReport” operation with which we can call BIP report and get output in Base64 format.
We will call simple BIP report created in cloud application using SOAP Web service.
Here we will use SOAP UI tool to call this SOAP Web service. We can download this free tool from below link
Below oracle documentation has given all WSDL details required for calling this web service.
Introduction to the BI Publisher Web Services (oracle.com)
WSDL: http://<host>:<port>/xmlpserver/services/v2/ReportService?wsdl
Now let us create WSDL for our instance:
WSDL:
https://xx-test.oraclecloud.com/xmlpserver/services/v2/ReportService?wsdl
let us consider below sample BIP report which we have created earlier sections:
Report path is as below:
/Custom/Reports/XX Test BIP Report.xdo
Now let us run this report manually:
The report output format is csv.
Now we will call this report from SOAP UI using SOAP WSDL.
Open SOAP UI application.
Go to SOAP option at the top of application.
This will create new SOAP Project.
Here we need to provide Project Name (Any Name) and WSDL for our instance.
Now new SOAP project created with report catalog WSDL.
Now go to runReport operation.
Right Click on Request1 to create Clone request.
Here we can give any name to clone request.
Now we need to use below payload to call SOAP webservice.
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
- <soapenv:Header/>
- <soapenv:Body>
- <v2:runReport>
- <v2:reportRequest>
- <v2:parameterNameValues>
- <v2:listOfParamNameValues>
- <v2:item>
- <v2:name>P_INVOICE_NUM</v2:name>
- <v2:values>
- <v2:item>JGA 2012155</v2:item>
- </v2:values>
- </v2:item>
- </v2:listOfParamNameValues>
- </v2:parameterNameValues>
- <v2:XDOPropertyList/>
- <v2:attributeFormat>csv</v2:attributeFormat>
- <v2:attributeLocale>en-US</v2:attributeLocale>
- <v2:reportAbsolutePath>/Custom/Reports/XX Test BIP Report.xdo</v2:reportAbsolutePath>
- <v2:byPassCache>false</v2:byPassCache>
- <v2:flattenXML>false</v2:flattenXML>
- </v2:reportRequest>
- <v2:userID>Casey. Brown</v2:userID>
- <v2:password>******</v2:password>
- </v2:runReport>
- </soapenv:Body>
- </soapenv:Envelope>
Here we can see output is generated under reportBytes.
The output is in base64 format.
We can decode base64format using below site:
In this way, we can decode Base64 format and get the report output in desired format.