Search code examples
phpapiazuresoap-clientazure-logic-apps

Can I make a SOAP API call in Azure Logic App


I'm an experienced data analist with mostly SQL and R experience, little Python, and unfortunately little .NET and PHP exposure. I have searched extensively for anyone with a similar questions, but unfortunately I haven't found what I'm looking for.

Situation: I'm setting up an HDInsight cluster on Azure (with Apache Spark) and I need to pull in some data from a SOAP API (no restful API).

Problem: Where and how do I pull this data in? I thought the Logic App in Azure would be a suitable place. However, I don't quite succeed in calling on this API. I do have a working PHP script with a proper API call. Here is a (part of) the syntax.

$client = new SoapClient('http://someURL?wsdl');
$webservice = new SoapClient('http://someotherURL?wsdl');
$session = $client->someOperationToLogin($var1, $var2, $var3);
$operation = $webservice->someOperationToGetData($session, $var4, $var5);
$session = $client->logout($session);

As you can see, I first need to obtain a session id and then use this session id in subsequent calls. As far as I understand, I can't get to this data through a simple HTTP request.

Questions:

  1. Can I call this particular SOAP API directly through one of the existing connectors in the Azure Logic App
  2. If (1) is not possible, can I make use of the existing PHP script? How and where?
  3. Is there any other route I can follow to make use of the data through this SOAP API? For instance: using pyspark in the Spark/HDInsight Cluster?

I really appreciate your help and pointers.


Solution

  • There are no SOAP APIs called thru the existing connectors in Azure Logic App.

    This is a list of Connectors and API Apps Reference: https://msdn.microsoft.com/en-us/library/azure/dn948518.aspx. Their supported functions are all based on REST APIs via Http/Https.

    All services & apis on Azure are almost based on REST APIs to compatible with crossover platform & language scenes.

    But even so, you can create own SOAP APIs thru Azure App Service or Cloud Service.Please refer to http://azure.microsoft.com/en-us/documentation/services/app-service/api/ and https://azure.microsoft.com/en-us/documentation/articles/app-service-logic-arm-with-api-app-provision/.

    In Azure HDInsight, you can pull in some data from Storage Service and Service Bus. If you want to use Azure Logic App, the exisiting connectors are Blob Connector and ServiceBus Connector, and even Dropbox Connector.

    You can refer to the references below to use PHP script to access the Azure Storage & ServiceBus services linked as HDInsight resources to store/get or send/receive some data. 1.https://azure.microsoft.com/en-us/documentation/articles/storage-php-how-to-use-blobs/ 2.https://azure.microsoft.com/en-us/documentation/articles/service-bus-php-how-to-use-queues/.

    Best Regards.