Share via


Logic App using Schemas and Maps

Introduction

As a BizTalk Developer in Cloud, most of the time we are interested in the type of the messages we deal, transforming one message into another and formatting the elements in the message.

How to do it in a LogicApp? The answer is “Integration Account”. Using Integration Account, we could load or create Schemas and Maps in Azure so that using Schemas we could validate a message from On-premises/cloud and transform them using Maps.

Scenario

We are going to see the new feature in Azure Logic App called “Integration Account” that contains our Maps and Schemas. We are going create a logic app which takes an HTTP request, transform it to another format and return the same as an HTTP response.

Steps

  1. Once your login is successful to the Azure portal you create one “Integration Account” as below.

    https://howtologicapp.files.wordpress.com/2016/12/1.png?w=720

  2. Click Create Button.

    Fill in the below details to create one.

    https://howtologicapp.files.wordpress.com/2016/12/2.png?w=249&h=588

  3. Click Create Button

    Once it is successfully deployed, you could see it in the portal-> All Resources->Integration Account

    https://howtologicapp.files.wordpress.com/2016/12/3.png?w=720

  4. Now start adding schemas and Maps (XSLT for now, not actual BizTalk Maps)

https://howtologicapp.files.wordpress.com/2016/12/5.png?w=7205. Add Maps

https://howtologicapp.files.wordpress.com/2016/12/6.png?w=720

6. Set Integration Account for the Logic App that you are developing so that your Schemas and Maps would be visible to your Logic App.

https://howtologicapp.files.wordpress.com/2016/12/7.png?w=720

7. The Logic App looks like below. It has a Transform XML shape that loads all the Maps available in the “Integration Account”. If the Integration Account hasn't been set then no maps will be visible.

https://howtologicapp.files.wordpress.com/2016/12/9.png?w=720

8. This Logic App accepts a HTTP request and using “Transform XML” shape it converts it into another XML type. The XSL file looks very simple like the below.

<?xml version=”1.0″ encoding=”utf-8″?>

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform&#8221;

xmlns:msxsl=”urn:schemas-microsoft-com:xslt” exclude-result-prefixes=”msxsl”

>

<xsl:output method=”xml” indent=”yes”/>

<xsl:template match=”/”>

<ns0:GetCountries xmlns:ns0=”http://www.webserviceX.NET&#8221; />

</xsl:template>

</xsl:stylesheet>

9. The above XSLT generates the empty GetCountriesMessage (yellow highlighted), If we trigger the message from fiddler it returns the Transformed XML.

https://howtologicapp.files.wordpress.com/2016/12/callws.png?w=720

10. You could verify your workflow instance in the portal as follows:

 

Other languages