Invoking SOAP Services from Oracle Visual Builder [Part 1]

Satish KumarSatish Kumar
3 min read

Oracle Visual Builder (VBCS) is built with REST in mind — but the real world isn’t always that simple. Many enterprise applications, especially older or vendor-locked systems, still expose their integrations only through SOAP APIs.

If your VBCS application needs to consume SOAP data, you might think you need an extra middleware layer. The good news? You can connect directly from VBCS without leaving the platform.

In this guide, we’ll walk through setting up a VBCS service connection for SOAP, preparing a request payload, and invoking the API — all using a real-world example: running a BI Publisher report via the ExternalReportWSSService.

Defining the Service Connection for SOAP Call

In VB, navigate to the Service Connections, create a new connection, and select Define by Endpoint

Key Points

  1. Set the HTTP Method to POST

  2. URL: https://{{yourhostname}}/xmlpserver/services/ExternalReportWSSService

  3. Request static header: Content-Type: application/soap+xml;charset=UTF-8

  4. Note the Service Name and the Endpoint ID. In this example these are ExternalReportWSSService and postXmlpserverServicesExternalReportWSSService

Final Service Connection JSON would be something like this,

{
    "openapi": "3.0.0",
    "info": {
        "title": "ExternalReportWSSService",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "vb-catalog://backends/SaaS"
        }
    ],
    "paths": {
        "/xmlpserver/services/ExternalReportWSSService": {
            "post": {
                "operationId": "postXmlpserverServicesExternalReportWSSService",
                "requestBody": {
                    "content": {
                        "application/json": {}
                    }
                },
                "responses": {},
                "x-vb": {
                    "actionHint": "getMany",
                    "headers": {
                        "Content-Type": "application/soap+xml;charset=UTF-8"
                    }
                }
            }
        }
    }
}

Preparing the SOAP Request Payload

Next we need to prepare the SOAP Request which will be in XML Format. For simplicity we are doing this in the page level JS Function. But for a robust code, define this function as a separate file which can be invoked from many places.

Key Points

  1. This request is trying to invoke a BIP located in ‘/Custom/SOAPDemo/DemoRPT.xdo

  2. There are no parameters being passed to the BIP for this demo. Hence the parameterNameValues is empty.

  3. In order to make this function reusable generally you would make the report path and parameters parameterized from the function which is outside the scope of this demo.

  4. For this function to work we need to define the VB Helper REST Utility. Check the first line define.

  5. Note the line Rest.get(…). The parameter to tat function is ‘ServiceName/EndpointID’ which we noted down in the previous step of creating the service connection.

This function is preparing the payload, invoking the API and returning the reportBytes XML tag content which generally contains the base64 encoded response. If you are invoking any other endpoint the function should be altered accordingly.

define(['vb/helpers/rest'], (Rest) => {
  'use strict';

  class PageModule {

    callBIP() {
      return new Promise(function (resolve, reject) {
        let soapRequest = '<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:parameterNameValues>\
                              <pub:reportAbsolutePath>/Custom/SOAPDemo/DemoRPT.xdo</pub:reportAbsolutePath>\
                              <pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>\
                        </pub:reportRequest>\
                        </pub:runReport>\
                      </soap:Body>\
                    </soap:Envelope>';
        console.log(soapRequest);
        Rest.get('ExternalReportWSSService/postXmlpserverServicesExternalReportWSSService').body(soapRequest).fetch().then(
          response => {
            let xmlResponse = $.parseXML(response.body);
            let reportBytes = xmlResponse.getElementsByTagNameNS("*", "reportBytes")[0].textContent;
            resolve(reportBytes);
          });
      });
    }
  }

  return PageModule;
});

Invoking the SOAP Service Connection from JavaScript

Now that the JS function is defined we can invoke this function from any action chain. If the function was designed to accept report path and other parameters , then these will be passed into the function from within the Action Chain.

The previous function in general would return the response of the Webservice Call. In our case specifically it would return the base64 encoded string which can be further parsed as required.

By now, you’ve successfully created a SOAP service connection in VBCS, built your SOAP request, and invoked it from JavaScript. The service is returning the base64-encoded output from your BI Publisher report.

In Part 2, we’ll take that encoded response, decode and parse it into JSON, and display it in your application’s UI — plus cover how to adapt the approach for AppUI extensions.

0
Subscribe to my newsletter

Read articles from Satish Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Satish Kumar
Satish Kumar

The views, thoughts, and opinions expressed belong solely to the author, and not necessarily to the author's employer, organization, committee or other group or individual.