Monday, December 29, 2025

Scheduling and Fetching output of a BIP Report using Webservice

We have likely encountered a scenario where a report call fails because it exceeds the online viewing timeout or the maximum allowed file size limit for online rendering. In these situations, the standard runReport method from the ExternalReportWSSService simply isn't enough, the call will time out, leaving us with an error instead of data.

To handle these high-volume requirements, we need to shift from synchronous execution to an asynchronous scheduling model.

In this post, we will do a deep dive into how to use the ScheduleReportWSSService to programmatically schedule a report, manage its execution, and successfully fetch the output once it's ready.

Comparison: Synchronous vs. Asynchronous Report calls



Feature

ExternalReportWSSService-runReport (Online)

ScheduleReportWSSService (Scheduled)

Best For

Small, quick data pulls

Large datasets & complex logic

Timeout Risk

High (usually 300 seconds)

None (runs in background)

File Size Limit

Strict limits (around 500MB of XML)

Much higher thresholds as it considers formatted output lik csv

Execution

Synchronous (wait for response)

Asynchronous (polling)


Sample WSDL: 

https://abcd-saasfademo1.ds-fa.oraclepdemos.com:443/xmlpserver/services/ScheduleReportWSSService?WSDL

Shedule a report:

Request Payload:

<soap:Envelope
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
    <soap:Header/>
    <soap:Body>
        <sch:scheduleReport>
            <scheduleRequest>
                <reportRequest>
                    <attributeFormat>csv</attributeFormat>
                    <parameterNameValues>
                        <item>
                            <name>query1</name>
                            <values>
         <item>c2VsZWN0ICogZnJvbSBnbF9qZV9saW5lcyB3aGVyZSByb3dudW08MTAwMA==
                     </item>
                            </values>
                        </item>
                    </parameterNameValues>
                    <reportAbsolutePath>/Custom/FAH/Sumit/QBReport.xdo</reportAbsolutePath>
                    <sizeOfDataChunkDownload>-1</sizeOfDataChunkDownload>
                </reportRequest>
                <saveDataOption>true</saveDataOption>
                <saveOutputOption>true</saveOutputOption>
                <schedulePublicOption>true</schedulePublicOption>
            </scheduleRequest>
        </sch:scheduleReport>
    </soap:Body>
</soap:Envelope> 

 

Response: 

 <env:Envelope
    xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Header/>
    <env:Body>
        <ns0:scheduleReportResponse
            xmlns:ns0="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
            <ns3:scheduleReport
                xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">534382
            </ns3:scheduleReport>
        </ns0:scheduleReportResponse>
    </env:Body>
</env:Envelope> 

 

When we successfully submit a request via the ScheduleReportWSSService

the jobId returned in the initial response is actually the Parent Job ID.

While this ID confirms submission, it cannot be used for tracking progress or downloading the final output. 

For all downstream activities—such as checking status or fetching the report,we must retrieve the Child Job ID.

Note: There is often a 10–15 second lag between the submission of a parent job and the spawning of the child job within the BIP scheduler. 

When automating this process, our code must include a retry mechanism or a "sleep" timer to account for this delay, 

otherwise, our lookup for the child ID will return empty.

 

How to Retrieve the Child Job ID

We can retrieve the child instance using two primary operations. Both require the Parent Job ID as an input:

  1. getAllJobInstanceIDs: We pass the submittedJobId (Parent ID) in the request to receive a list of associated instance IDs.

  2. getAllScheduledReportHistoryInfo: We pass both the jobInstanceID (Parent ID) and the owner (user ID) 

    to get detailed history, including the child ID.

In the following example, we will focus on getAllJobInstanceIDs

 

Sample Logic Flow
  1. Submit report Get Parent Job ID.

  2. Wait ~15-20 seconds (to allow BIP to spawn the instance) or add retry.

  3. Call getAllJobInstanceIDs using the Parent ID.

  4. Extract the Child Job ID from the response.

  5. Monitor the Child Job ID for completion.

 

Request Payload:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
   <soap:Header/>
   <soap:Body>
      <sch:getAllJobInstanceIDs>
         <submittedJobId>534382</submittedJobId>
      </sch:getAllJobInstanceIDs>
   </soap:Body>
</soap:Envelope>

 

Response Payload:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <ns0:getAllJobInstanceIDsResponse xmlns:ns0="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
         <ns3:getAllJobInstanceIDs xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">534383</ns3:getAllJobInstanceIDs>
      </ns0:getAllJobInstanceIDsResponse>
   </env:Body>
</env:Envelope> 

 

Now once we have the  child job ID, we will use this for further processing.

This will be the job ID we will be seeing in BIP scheduler UI, we will Poll for this job for the terminal state - error or success or warning

 

 We can use either of the below operations by passing the child job id we obtained in the previous step:

Both gives the job status field in their responses. 

getReportHistoryInfo or getScheduledReportOutputInfo  

 

getReportHistoryInfo

Request Payload:

 <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
   <soap:Header/>
   <soap:Body>
      <sch:getReportHistoryInfo>
         <jobInstanceID>534383</jobInstanceID>
      </sch:getReportHistoryInfo>
   </soap:Body>
</soap:Envelope>

Response:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <ns0:getReportHistoryInfoResponse xmlns:ns0="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
         <ns3:getReportHistoryInfo xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
            <burstingJob>false</burstingJob>
            <created>2025-12-26T06:42:10.835Z</created>
            <deleted>false</deleted>
            <endDate>2025-12-26T06:42:12.276Z</endDate>
            <instanceId>1</instanceId>
            <isPublic>true</isPublic>
            <jobId>534383</jobId>
            <jobType>Instance</jobType>
            <lastUpdated>2025-12-26T06:42:12.289Z</lastUpdated>
            <owner>FIN_IMPL</owner>
            <parentJobId>534372</parentJobId>
            <reportUrl>/Custom/FAH/Sumit/QBReport.xdo</reportUrl>
            <startDate>2025-12-26T06:42:11.316Z</startDate>
            <status>Success</status>
            <statusDetail>::JOB_WAIT_TIME_SECONDS{0.5}::JOB_FETCH_TIME_SECONDS{0.3}::

JOB_EXECUTION_TIME_SECONDS{0.9}::JOB_PRIORITY_COLON_NORMAL::[INSTANCE_ID=bip.bi_server1]</statusDetail>
         </ns3:getReportHistoryInfo>
      </ns0:getReportHistoryInfoResponse>
   </env:Body>
</env:Envelope> 

 

Once the job succeeds of results in error, we will use getScheduledReportOutputInfo 

 We will get the output id in response:

Request Payload: 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
   <soap:Header/>
   <soap:Body>
      <sch:getScheduledReportOutputInfo>
         <jobInstanceID>534383</jobInstanceID>
      </sch:getScheduledReportOutputInfo>
   </soap:Body>
</soap:Envelope> 

 

Response:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <ns0:getScheduledReportOutputInfoResponse xmlns:ns0="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
         <ns3:getScheduledReportOutputInfo xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
            <jobOutputList>
               <burstKey/>
               <created>2025-12-26T06:42:11.877Z</created>
               <deleted>false</deleted>
               <documentDataAvailable>true</documentDataAvailable>
               <documentDataCompressed>false</documentDataCompressed>
               <documentDataContentType>csv</documentDataContentType>
               <documentDataFileExtension>.csv</documentDataFileExtension>
               <documentDataMIMEType>text/plain;charset=UTF-8</documentDataMIMEType>
               <jobId>534383</jobId>
               <lastUpdated>2025-12-26T06:42:12.265Z</lastUpdated>
               <outputId>445134</outputId>
               <outputName>null0-Document-1</outputName>
               <status>Success</status>
               <statusDetail>::DOCUMENT_PROCESSING_SUCCESSFUL::[INSTANCE_ID=bip.bi_server1]</statusDetail>
            </jobOutputList>
         </ns3:getScheduledReportOutputInfo>
      </ns0:getScheduledReportOutputInfoResponse>
   </env:Body>
</env:Envelope>

 

Now  we have the outputId  with us. Using this we can call another operation getDocumentData  to get the report output.

Request payload:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
   <soap:Header/>
   <soap:Body>
      <sch:getDocumentData>
         <jobOutputID>445134</jobOutputID>
      </sch:getDocumentData>
   </soap:Body>
</soap:Envelope> 


Response:

<env:Envelope
    xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Header/>
    <env:Body>
        <ns3:getDocumentDataResponse
            xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
            <getDocumentData>u79KRV9IRUFERVJfSUQsSkVfTElORV9OVU0sTEFTVF9==</getDocumentData>
        </ns3:getDocumentDataResponse>
    </env:Body>
</env:Envelope> 

 

Alternatively we can use below approach as well, when we have large volume data:

Use downloadDocumentData  by passing the output id in request and in respone a temp file id of the output is generated.

Request Payload:

 <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
   <soap:Header/>
   <soap:Body>
      <sch:downloadDocumentData>
         <jobOutputID>445134</jobOutputID>
      </sch:downloadDocumentData>
   </soap:Body>
</soap:Envelope>

 

Response:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <ns0:downloadDocumentDataResponse xmlns:ns0="http://xmlns.oracle.com/oxp/service/ScheduleReportService">
         <ns3:downloadDocumentData xmlns:ns3="http://xmlns.oracle.com/oxp/service/ScheduleReportService">documents/xmlpwsH9ClHjGCxM10958656929576981152.tmp</ns3:downloadDocumentData>
      </ns0:downloadDocumentDataResponse>
   </env:Body>
</env:Envelope> 

 

Now using this temp file, we need to use ExternalReportWSSService 

 Sample WSDL:

https://abcd-saasfademo1.ds-fa.oraclepdemos.com:443/xmlpserver/services/ExternalReportWSSService?wsdl

Under this webservice we need to use : downloadReportDataChunk operation

 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:downloadReportDataChunk>
         <pub:fileID>documents/xmlpwsr4s4rvjbm510014970007467993864.tmp</pub:fileID>
         <pub:beginIdx>1</pub:beginIdx>
          <pub:size>500000000</pub:size>
      </pub:downloadReportDataChunk>
   </soap:Body>
</soap:Envelope> 

 

Note: Provide size value as some very huge number if we want to get in one go else iterate untill report output is fetched.

 

Response: 

 <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <ns2:downloadReportDataChunkResponse xmlns:ns2="http://xmlns.oracle.com/oxp/service/PublicReportService">
         <ns2:downloadReportDataChunkReturn>
            <ns2:reportDataChunk>u79KRV9IRUFERVJfSUQsSkVfTElORV9OVU0sTEFTVF9==</ns2:reportDataChunk>
            <ns2:reportDataFileID>documents/xmlpwsr4s4rvjbm510014970007467993864.tmp</ns2:reportDataFileID>
            <ns2:reportDataOffset>-1</ns2:reportDataOffset>
         </ns2:downloadReportDataChunkReturn>
      </ns2:downloadReportDataChunkResponse>
   </env:Body>
</env:Envelope>


No comments:

Post a Comment