How to create a SOAP API function in Azure to run a report and get the output from Oracle Cloud

Savez Shabkhez 0 Reputation points
2023-05-15T08:39:49.0666667+00:00

Hi,

We want to run a report using SOAP that is created in Oracle HCM Cloud. We have a WSDL url and a simple call which provides the parameters and path. However, we're unsure how to call it using Azure Functions or Powershell or any other utility.

Thanks!

Savez

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
Windows for business Windows Server User experience PowerShell
{count} votes

2 answers

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-05-15T09:44:31.2066667+00:00

    There isn't an Azure Service that will easily consume the SOAP API endpoint and make development easier. Azure API Management will allow you to import the WSDL, and represent the API for easier consumption by your code (such as via a REST based call) - however i don't think that's really the problem you're trying to solve.

    Critical to approach is where you want the data to end up. If it was Excel, then i'd probably start by following this https://learn.microsoft.com/en-us/sharepoint/dev/general-development/accessing-the-soap-api

    However if it was Azure Functions or a TBD system, then I'd start by solving the problem locally in Postman to craft the right data to send to the SOAP api to get the data you need. Here is a blog describing the process; https://blogs.sap.com/2021/08/04/calling-a-soap-api-using-postman/

    Once you know the xml data for the soap envelope, I would then seek to write an Azure function that would be triggered via Http/Timer/another app to call the SOAP API. Code it in your language of choice (PowerShell/C#/etc), which Azure Functions has broad support for.

    Further reading;
    Visual Studio : https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide
    PowerShell : https://jpearson.blog/2019/04/09/calling-soap-services-from-powershell/

    0 comments No comments

  2. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-05-16T10:21:44.64+00:00

    @Savez Shabkhez Thanks for reaching out.

    To call a SOAP API using Azure Functions or PowerShell, you can use the WSDL file to generate a client proxy class that can be used to call the API.

    Here are the general steps to call a SOAP API using Azure Functions or PowerShell:

    1. Download the WSDL file for the Oracle HCM Cloud SOAP API.
    2. Use a tool such as wsdl.exe (for .NET) or wsimport (for Java) to generate a client proxy class from the WSDL file. This class will provide the methods and objects needed to call the SOAP API.
    3. In your Azure Function or PowerShell script, create an instance of the client proxy class and call the appropriate method to invoke the SOAP API. You will need to provide the necessary parameters and credentials to authenticate with the Oracle HCM Cloud API.

    Alternative you can leverage APIM to import your WSDL file to create the endpoint and if use this endpoint to call in any of your applications. If you want to perform some business logic which cannot be done using .NET Framework types allowed in policy expressions then you can further create Azure function that performs the business logic and function will call the APIM endpoint internally.

    Feel free to get back to me if you have any queries or concerns.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.