I'm building a Logic App to pull data from my on-premise SQL database -> transform it into XML -> Send it through to SOAP API.
Here's the example data what I'm getting into Logic App from my on-premise database:
{
"ResultSets": {
"Table1": [
{
"ID": "VM001",
"FirstName": "TestFirstName",
"LastName": "TestLastName",
"Email": "test1@company.com",
"DOB": "1990-05-05"
},
{
"ID": "VM002",
"FirstName": "TestFirstName2",
"LastName": "TestLastName2",
"Email": "test2@company.com",
"DOB": "1990-06-06"
}
]
},
"OutputParameters": {}
}
...then my plan is to call an internal API and apply some sort of policy (I believe we can use Liquid Template in Inbound/Outbound Policies without using Integration Account or Azure Function) to transform above data into below XML but I'm struggling with it:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<userRequest>
<extMessageId>12345</extMessageId>
<users>
<!--1 or more repetitions:-->
<user>
<ID> ID from JSON data </ID>
<!--Optional:-->
<FirstName> FirstName from JSON data </FirstName>
<LastName> Lastname from JSON data </LastName>
<Email> Email from JSON data </Email>
<DOB> DOB from JSON data </DOB>
</user>
</users>
</userRequest>
</soapenv:Body>
</soapenv:Envelope>
Can someone please help.