Calling SOAP Web Services Using Power Automate Desktop
  • 27 May 2022
  • 1 Minute to read
  • Contributors
  • Comments
  • Dark
    Light
  • PDF

Calling SOAP Web Services Using Power Automate Desktop

  • Comments
  • Dark
    Light
  • PDF

#ServerlessTips - Power Automate
Author: Kent Weare Integration MVP

In this post, we are going to discuss a new feature found in the September 2021 release of Power Automate Desktop. In this release, makers can now call SOAP Web Services using a new action called Invoke SOAP web service.

Since many RPA processes involve legacy applications, the need for SOAP support was inevitable. In this post we will walk through how we can call a sample web service found at: www.dneonline.com/calculator.asmx?wsdl. Using this sample we will be able to add two numbers and then get the result.

Solution

  1. Start by creating two input variables called Number1 and Number2. Provide default values that allow us to test our process once we are done.

  2. Add the Invoke SOAP web service and then click on Build request.

  3. Provide a WSDL of http://www.dneonline.com/calculator.asmx?wsdl and then click on Import. Once you have done so, you will see the Service, Port, SOAP version and Operation populated. We will deal with the Request envelope in next step.

  4. We now need to deal with the Request envelope. For this example we can use this sample. For other examples, I recommend that you use a tool like SoapUI where you can interact with the web service and then copy out your SOAP request message body and include it here.

Note: Since we are using Power Automate Desktop, we can embed variables within these messages so that we can dynamically pass values in. In this example, we are passing input variables called Number1 and Number2.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:Add>
         <tem:intA>%Number1%</tem:intA>
         <tem:intB>%Number2%</tem:intB>
      </tem:Add>
   </soapenv:Body>
</soapenv:Envelope>

Our final configuration should look like this:

Testing

We can now test our Desktop Flow and can see our result is returned back to Power Automate Desktop in the form of a variable: SoapServiceResponse.

Conclusion

In this post, we discussed a new feature that allows us to call SOAP Web services. This allows customers to automate with legacy applications that use SOAP as their communication layer.
To see a video recap of this content, please check out the following YouTube video: Calling SOAP Web Services Using Power Automate Desktop.


Was this article helpful?