Logic App SOAP Pass-through Custom Connector

This feature has just rolled-out to production and although the team didn't get yet to publish official blog post and documentation update, we already have some eager customers trying it out. As this feature requires a few tweaks to use, here is a very rough example to get people started.

After creating a new Logic Apps custom connector, edit it and select SOAP (Preview) as API endpoint. Then you need to start by selecting the call mode:

Use our sample service as backend target:

Host: fazioapisoap.azurewebsites.net

Base URL: /FazioService.svc

After adding an HTTP request trigger and the SOAP Passthrough action in the designer, switch to code view to tweak the following in the Logic App definition (XML body and couple of required headers):

  "actions": {
     "SoapPassThrough": {
         "inputs": {
             "body": "<Envelope xmlns=\"https://schemas.xmlsoap.org/soap/envelope/\"><Body><GetOrder xmlns:xsi=\"https://www.w3.org/2001/XMLSchema-instance\" xmlns=\"https://tempuri.org/\"><orderId>2468</orderId></GetOrder></Body></Envelope>",
             "headers": {
                 "Content-Type": "text/xml",
                 "SOAPAction": "https://tempuri.org/IFazioService/GetOrder"
             },

Note you cannot edit this in the designer going forward because it does not expect non-Json body or headers for this action as the Swagger can't declare either.

Here is a sample run:

Some basic troubleshooting:

  • "statusCode": 415, aka UnsupportedMediaType -> you need to add the HTTP headers in code view to specify Content-Type as text/xml
  • "statusCode": 400, aka BadRequest -> Could be that the HTTP header SOAP action mismatches with the body SOAP envelop payload. Could be that the XML in the payload is malformed.
  • "statusCode": 500, aka Internal Server Error, Logic App automatically retries and the response output mentions the gateway service -> Could be that the on-premises SOAP service is offline hence the gateway couldn't call it.