Wednesday, September 9, 2020

How to Download the PDF Output from ESS Job

 

Introduction

In the last article I explained you, 'How to submit the ESS Job using SOAP Service'. You can check the earlier post using the link

In this post I am going to explain you how to download the PDF output of submitted ESS Job. As I explained in earlier post, currently the ERP Integration service is not supporting to download the PDF output and you can find the details of bug in Doc ID 2524625.1.

Detailed Steps- 

1. Run the ESS Job using SOAP Service or from Fusion Application.  

           

 

2. Run below script to get the BI Job ID -

Select requestid “ESS Request ID”, value “BI JobID”

From fusion_ora_ess.request_property

Where name = 'outputOverrideParameter' and requestid ='&requestid';

    

    If you want to do the automation then, create a BIP report using above query and then you can call the BIP report using SOAP service. I will cover this topic in next post.

 

 

3.  Get the Job Output ID –

        Web Service WSDL -- https://<host:port>/xmlpserver/services/v2/ScheduleService?WSDL

        Operation                -- getScheduledReportOutputInfo

 

        Payload - Pass the user id and password details while running this payload

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">

 <soapenv:Header/>

   <soapenv:Body>

      <v2:getScheduledReportOutputInfo>

         <v2:jobInstanceID>1186</v2:jobInstanceID>

         <v2:userID>XXXXXXXX</v2:userID>

         <v2:password>XXXXX</v2:password>

      </v2:getScheduledReportOutputInfo>

   </soapenv:Body>

</soapenv:Envelope>

 

 

   Response – In the response, you will get the output id

       

 

 

4. Get the File ID – You can pass the output ID from above as a parameter to this service

        Web Service WSDL -- https://<host:port>/xmlpserver/services/v2/ScheduleService?WSDL

        Operation                -- downloadDocumentData

     

         Payload –

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">

<soapenv:Header/>

<soapenv:Body>

<v2:downloadDocumentData>

<v2:jobOutputID>1165</v2:jobOutputID>

<v2:userID>XXXXXXXX</v2:userID>

<v2:password>XXXXXX</v2:password>

</v2:downloadDocumentData>

</soapenv:Body>

</soapenv:Envelope>

Response –

 

 

5. Download the PDF file Content –

                  Using below service you can download the content of PDF file. The content will be in Base64 format and you need to convert it into actual PDF.

                  For my testing purpose I used online tool to convert the Base64 to PDF file. 

 

      Web Service WSDL -- https://<host:port>/xmlpserver/services/ExternalReportWSSService?WSDL

      Operation                -- downloadReportDataChunk

 

       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:downloadReportDataChunk>

         <pub:fileID>documents/xmlpwsQCoUc3oKnE4536006652736644380.tmp </pub:fileID>

         <pub:beginIdx>0</pub:beginIdx>

         <pub:size>10000</pub:size>

      </pub:downloadReportDataChunk>

   </soap:Body>

</soap:Envelope>

 

 

 

Response –

 

 

6. Save the Base64 Content into text file and convert it into PDF

 

Link to Decode Base64 Content - https://www.base64decode.org/


No comments:

Post a Comment

How to Download the PDF Output from ESS Job

  Introduction In the last article I explained you, 'How to submit the ESS Job using SOAP Service'. You can check the earlier po...