When using SOAP Pass-through custom connector in Logic App, I previously provided steps to switch to code view to add required headers Content-Type and SOAP Action such as:
"actions": { "SoapPassThrough": { "inputs": { "body": "<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><GetOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/"><orderId>2468</orderId></GetOrder></Body></Envelope>", "headers": { "Content-Type": "text/xml", "SOAPAction": "http://tempuri.org/IFazioService/GetOrder" },
Now if you are used to the Logic App designer UX this can be a bit uncomfortable, so here are steps from our support engineer Xuehong Gan to populate these from UX instead:
- Use “Import from sample” and do add Operation Id to the end of URI. Set headers and an empty body.
- Once imported, click on ContentType and SoapAction buttons to add their values into the default value field.
- When you use the custom connector, the two headers will show up automatically with the default values.
- Create a string variable xmldata and set the XML request to it. Then in the custom connector, you can use xmldata variable as the body.
- Here is a sample test run of the resulting Logic App.