In the current blog post we would be perform some validation and transformation for the incoming XML.
Before we start working with Logic Apps I have created a Schema and corresponding map transformation using Visual Studio and saved it on a local drive.
Login to the Azure portal and create an Integration Account. Here we will be uploading the schema and transformation created in our previous step.
One the Integration account is in place you will see the account as below. Here we will be uploading our schema and map files.
Now once the schema and maps are in place, next step is to used them in our Logic Apps. Create a Logic App and in the designer view select Request / Response template.
Save the Logic App for now. In order to access schema and map created above we need to link our integration account with the Logic App. Navigate to your Log App Workflow settings and link the integration account.
Now you should be able to access your schema and map in your Logic App. Navigate to your logic app designer view and add the below 2 actions.
- XML Validation
- Transform XML
In you 1st Step when and HTTP request is received, keep the request body Json schema as empty.
IN you XML validation select the CustomerInfo schema from the drop down and CustomerMap accordingly.
The output will be nothing but a Transformed XML. Save your Logic app and now lets test the scenario using a Postman.
Copy the URL from the 1st step of your Logic App and post a request to your Logic App. The body will contain the instance of your schema. You must receive an output which is nothing but a transformed XML ( Concatenation of First Name and Last Name ).
You can always check the STATUS of your logic app from the overview tab.