Close

SOAP Pass-Through via a Logic App

Calling a SOAP service via a Logic App starts by creating a Logic Apps Custom Connector. Note: You first have to create the Custom Connector. As a second step, you can add the Custom Connector to a logic app. I will use the same AFAs case as in the previous post. Below you will see the overview screen of the Logic Apps Cutom Connector named AFASAppConnectorGet.

You need to click the [Edit] button in the top menu. At the top of the screen you select SOAP Pass-Through.

Since you don’t specify a WSDL in this case, you will have to select the host and base URL manually:

We have left security empty and come to the next screen of the wizard, which is the Definition screen. Here we enter summary, description and operationid.

The reuest URL will automatically be built in the Request section: 99999.afasonlineconnector.nl/profitservices/appconnectorget.asmx/SoapPassThrough.

Now we can add the Logic App Custom Connector to a Logic App. After doing so, there’s one final gotcha. You will have to switch to code view to tweak the definition of the Logic Apps Custom Connector. You will have to add the body and headers like shown below. Note that for increased reusability, we get the connectorId from the request:

“GetData”: {
“inputs”: {
“body”: “<Envelope xmlns=\”http://schemas.xmlsoap.org/soap/envelope/\”><Body><GetData xmlns=\”urn:Afas.Profit.Services\”><token><![CDATA[<token><version>1</version><data>CAAA6BD…FFF1E9</data></token>]]></token><connectorId>@{triggerBody()?[‘connectorId’]}</connectorId><skip>0</skip><take>2</take></GetData></Body></Envelope>”,
“headers”: {
“Content-Type”: “text/xml;charset=UTF-8”,
“SOAPAction”: “urn:Afas.Profit.Services/GetData”
},
“host”: {
“connection”: {
“name”: “@parameters(‘$connections’)[‘AFASAppConnectorGet_1’][‘connectionId’]”
}
},
“method”: “post”,
“path”: “/SoapPassThrough”
},
“runAfter”: {},
“type”: “ApiConnection”
}

Leave a Reply

Your email address will not be published. Required fields are marked *