Report Calling using SOAP Webservices
Oracle has provided a webservice ExternalReportWSSService
with “runReport” Operation which helps to run a report which is on BIP of
Oracle ERP Cloud and get the output in base64 format. Below is the sample
payload.
Service WSDL URL: https://servername/xmlpserver/services/ExternalReportWSSService?WSDL
Operation: runReport
https://fa-esll-saasfademo1.ds-fa.oraclepdemos.com//xmlpserver/services/ExternalReportWSSService?WSDL
Then click on OK
Then Navigate to Runreport method and click on request, provide the Request payload
Request payload:
--------------------------
<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:parameterNameValues>
<pub:item>
<pub:name>p_date</pub:name>
<pub:values>
<pub:item>03-24-2023 00:00:00</pub:item>
</pub:values>
</pub:item>
<pub:item>
<pub:name>P_DOCID</pub:name>
<pub:values>
<pub:item>?</pub:item>
</pub:values>
</pub:item>
</pub:parameterNameValues>
<pub:reportAbsolutePath>/Custom/XXSAI_Custom/SCM/Integrations/XX_GetItem_Report/UCMREPORT.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
</soap:Body>
</soap:Envelope>
Report has 2 Parameter and the same need to be added in above Payload
Report Parameters are as shown below .
- p_date -->Mandatory parameter -- Incorporated in above XML Payload
- P_DOCID -->Optional Parameter -- Incorporated in above XML Payload
Request Payload
<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> <!-- Flatten XML should always be false when we have XML type of output to display the XML tags as mentioned in BIP Data Model and display XML structure in as expected format --> <pub:flattenXML>false</pub:flattenXML> <pub:parameterNameValues> <!--1st Parameter of BIP Report--> <pub:item> <pub:name>p_from_date</pub:name> <pub:values> <pub:item>10-01-2019</pub:item> </pub:values> </pub:item> <!--2ns Parameter of BIP Report--> <pub:item> <pub:name>p_to_date</pub:name> <pub:values> <pub:item>10-15-2019</pub:item> </pub:values> </pub:item> </pub:parameterNameValues> <pub:reportAbsolutePath>/Custom/Finacials/Payables/XX Vendor Outbound Report.xdo</pub:reportAbsolutePath> <!-- Setting sizeOfDataChunkDownload to -1 will return the output to the calling client --> <pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload> </pub:reportRequest> </pub:runReport> </soap:Body> </soap:Envelope> |
---------------------------------
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Header/> <env:Body> <ns2:runReportResponse xmlns:ns2="http://xmlns.oracle.com/oxp/service/PublicReportService"> <ns2:runReportReturn> <ns2:reportBytes>U1VQUExJRVJfTkFNRSxTVVBQTElFUl9OVU1CRVIsVEFYX0lELEVNQUlMX0FERFJFU1MsTEF
TVF9OQU1FLEZJUlNUX05BTUUsUEhPTkVfRkFYLFBIT05FX01PQklMRSxQSE9ORV9XT1JLCj
FfVGVzdF9TdXBwbF9TaGFpbCwxMDA3MSw5ODc2NTQzMjAsdGVzdDFAdGVzdC5jb20sMV9UZ
XN0X0xhc3QsMV9UZXN0X1NoYWlsX0NvbnRhY3QsbnVsbCw1NDMtNDM0MzQzNTQsMTIzLTEy
MzQzCg</ns2:reportBytes> <ns2:reportContentType>text/plain;charset=UTF-8</ns2:reportContentType> <ns2:reportFileID xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> <ns2:reportLocale xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> <ns2:metaDataList xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> </ns2:runReportReturn> </ns2:runReportResponse> </env:Body> </env:Envelope>
Then convert the encoded data to decoded data using base64 decode
Report Data:
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Oracle Analytics Publisher -Dataengine, datamodel:_Custom_SAI_Custom_SCM_Integrations_Cs_GetItem_Report_CS_UCMREPORT_DM_xdm -->
<DATA_DS><P_DATE>03-24-2023 00:00:00</P_DATE><P_DOCID></P_DOCID>
<G_1>
<DID>4502141</DID>
</G_1>
<G_1>
<DID>4502145</DID>
</G_1>
<G_1>
<DID>4502166</DID>
</G_1>
<G_1>
<DID>4502172</DID>
</G_1>
No comments:
Post a Comment