Sunday, July 11, 2021

Create a soap custom connector and call it from azure logic app

 

Now a days REST services are more popular but time to time we have to face SOAP services and required to call them in our existing flow/API/process. At the moment, Logic APP doesn’t provide SOAP based HTTP trigger, but we can easily call it from Logic APP.

In order to call SOAP service, we have to create SOAP custom Logic APP connector, once we publish the connector, we can call it from the Logic APP.


SOAP Service:

In this example, we are going to call below SOAP service, I found it from internet, you can use your own.

 

SOAP URL:

http://www.thomas-bayer.com/axis2/services/BLZService?wsdl




Use 10000000 value in request parameter to get expected response as mentioned in above screenshot.

 

Create a Resource:

  • In Azure portal create “Logic Apps Custom Connector

 


  • Give the required details to create custom connector, I have given here “soap-proxy

 


  • Hit Review + Create. Hit create again once asked.

 

  • Click Edit in above screen and use below details:

 


  • API Endpoint: use SOAP
  • Call Mode: SOAP to REST
  • Import Mode: WSDL URL (you can use WSDL file as well)
  • Click Import: it will automatically fill the HOST details

 


  • Click security
  • Authentication Type – you can use none or basic authentication, I have left it black as not required to call this SOAP service

 


  • Click on Definition
  • Fill some details in summary and description field. 


  • Click on update connector. Once saved, your connector is ready to use in Logic APP.

 

Create a Logic APP:

  • Create a Logic APP, I have created with name of “soap-custom-connector
  • Choose a HTTP trigger
  • In Request Body JSON Schema – create a schema from sample JSON

 

Sample JSON to create Schema:

 

{

    "bankcode":"11"

}



  •  Use method as POST



  • Click Next and use “Custom” in menu. You can see our new connector is visible here, what we just created “soap-proxy

 


  •  Select SOAP test call in from below screen


  • Select “blz” from the parameter


  •  Select bankcode as dynamic parameter


  • Add “Request” component and set dynamic response from SOAP call, set header and HTTP response code as mentioned below


  • Click save and try testing it. We will see a HTTP request URL generated for us as soon as we save it.




  •  You can run it in your favorite API testing tool, I am using SOAP UI.

 


 

  •  You can also see it in your Logic APP “Run History

 






No comments:

Post a Comment