Thursday, 9 April 2020

Mulesoft Integration with Oracle BIP Webservice

Use the following steps to consume Oracle BIP webservice and run the BI report.

  1. Create a mulesoft project called MuleToOracleBIIntegration. 
  2. Add HTTP listener to the flow. 
    • Add Connector configurations. 
      • Host - localhost
      • Port - 8081
      • Base Path - /
    • Specify the path 
      • Path - /bipintegration
    • Go to MIME Type section
      • MIME Type - application/json
    • Go to Advanced section
      • Allowed Method - POST
    • Go to Metadata section
      • Add metadata - Output:Payload
      • Add
      • Give a name - RequestPayload
        • Select Type - JSON
        • Example - Provide sample Json file. 
        • Select
  3. Add Logger
    • Message  - #[payload.elementname]
  4. Add Web Service Consumer 
    • Name - BIP Consumer
    • Connector Configurations
      • Add
      • Give a Name
      • General 
        • Soap Version - SOAP12
        • Wsdl location - https://hostname/xmlpserver/services/ExternalReportWSSService?wsdl
        • Service - ExternalReportWSSService
        • Port - ExternalReportWSSService
      • Transport  -- Note : This is for providing Basic Authentication
        • Transport Configuration : Http transport configuration
        • Request Config: 
          • Add
            • Name : basic-auth
            • Base Path : /
            • Authentication : 
              • Basic Authentication
              • Username
              • Password
      • General : 
        • Operation : runReport
        • Body : payload
  5. Now Add the Transformation before the WebService Consumer 
    • In output section, select  Define metadata option
      • Add
        • Provide a name : BIPResponse
        • Type : XMl
        • Sample : Provide sample response message. 
    • Map the incoming payload to runReport Payload Structure. 
    • Sample :
%dw 2.0
output application/xml
ns ns0 http://xmlns.oracle.com/oxp/service/PublicReportService
---
{
ns0#runReport: {
ns0#reportRequest: {
ns0#parameterNameValues: {
ns0#item: {
ns0#name: "P_REPORT_LAST_RUN_DATE",
ns0#values: {
ns0#item: payload.Parameter1
}
}
},
ns0#reportAbsolutePath: payload.XDO,
ns0#sizeOfDataChunkDownload: -1
}
}
}


  6.  Add Transform message After the web service consumer to get the BI response. 

import * from dw::core::Binaries
output application/xml
ns ns0 http://xmlns.oracle.com/oxp/service/PublicReportService
---
read(fromBase64(payload.body.ns0#runReportResponse.ns0#runReportReturn.ns0#reportBytes),'application/xml')

  7.  Add one more transform if you want to filter the response.


 


11 comments:

  1. Thank you for sharing wonderful information with us to get some idea about it.
    Mulesoft Online Training india
    Mulesoft Online Training in Hyderabad

    ReplyDelete
  2. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles
    Mulesoft Online Training

    ReplyDelete
  3. Its very informative blog and useful article thank you for sharing with us , keep posting learn more
    mulesoft course | mulesoft course online

    ReplyDelete