Transform XML with maps in Azure Logic Apps with Enterprise Integration Pack

To transfer XML data between formats for enterprise integration scenarios in Azure Logic Apps, your logic app can use maps, or more specifically, Extensible Style sheet Language Transformations (XSLT) maps. A map is an XML document that describes how to convert data from an XML document into another format.

For example, suppose you regularly receive B2B orders or invoices from a customer who uses the YYYMMDD date format. However, your organization uses the MMDDYYY date format. You can define and use a map that transforms the YYYMMDD date format to the MMDDYYY format before storing the order or invoice details in your customer activity database.

For limits related to integration accounts and artifacts such as maps, see Limits and configuration information for Azure Logic Apps.

Prerequisites

You don't need a logic app when creating and adding maps. However, to use a map, your logic app needs linking to an integration account where you store that map. Learn how to link logic apps to integration accounts. If you don't have a logic app yet, learn how to create logic apps.

Add referenced assemblies

  1. Sign in to the Azure portal with your Azure account credentials.

  2. To find and open your integration account, on the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.

    Find integration account

  3. Select the integration account where you want to add your assembly, for example:

    Select integration account

  4. On your integration account's Overview page, under Components, select the Assemblies tile.

    Select "Assemblies"

  5. After the Assemblies page opens, choose Add.

    Choose "Add"

Based on your assembly file's size, follow the steps for uploading an assembly that's either up to 2 MB or more than 2 MB but only up to 8 MB. For limits on assembly quantities in integration accounts, see Limits and configuration for Azure Logic Apps.

Note

If you change your assembly, you must also update your map whether or not the map has changes.

Add assemblies up to 2 MB

  1. Under Add Assembly, enter a name for your assembly. Keep Small file selected. Next to the Assembly box, choose the folder icon. Find and select the assembly you're uploading, for example:

    Upload smaller assembly

    In the Assembly Name property, the assembly's file name appears automatically after you select the assembly.

  2. When you're ready, choose OK.

    After your assembly file finishes uploading, the assembly appears in the Assemblies list.

    Uploaded assemblies list

    On your integration account's Overview page, under Components, the Assemblies tile now shows the number of uploaded assemblies, for example:

    Uploaded assemblies

Add assemblies more than 2 MB

To add larger assemblies, you can upload your assembly to an Azure blob container in your Azure storage account. Your steps for adding assemblies differ based whether your blob container has public read access. So first, check whether or not your blob container has public read access by following these steps: Set public access level for blob container

Check container access level

  1. Open Azure Storage Explorer. In the Explorer window, expand your Azure subscription if not already expanded.

  2. Expand Storage Accounts > {your-storage-account} > Blob Containers. Select your blob container.

  3. From your blob container's shortcut menu, select Set Public Access Level.

Upload to containers with public access

  1. Upload the assembly to your storage account. In the right-hand window, choose Upload.

  2. After you finish uploading, select your uploaded assembly. On the toolbar, choose Copy URL so that you copy the assembly's URL.

  3. Return to the Azure portal where the Add Assembly pane is open. Enter a name for your assembly. Choose Large file (larger than 2 MB).

    The Content URI box now appears, rather than the Assembly box.

  4. In the Content URI box, paste your assembly's URL. Finish adding your assembly.

After your assembly finishes uploading, the schema appears in the Assemblies list. On your integration account's Overview page, under Components, the Assemblies tile now shows the number of uploaded assemblies.

Upload to containers without public access

  1. Upload the assembly to your storage account. In the right-hand window, choose Upload.

  2. After you finish uploading, generate a shared access signature (SAS) for your assembly. From your assembly's shortcut menu, select Get Shared Access Signature.

  3. In the Shared Access Signature pane, select Generate container-level shared access signature URI > Create. After the SAS URL gets generated, next to the URL box, choose Copy.

  4. Return to the Azure portal where the Add Assembly pane is open. Enter a name for your assembly. Choose Large file (larger than 2 MB).

    The Content URI box now appears, rather than the Assembly box.

  5. In the Content URI box, paste the SAS URI you previously generated. Finish adding your assembly.

After your assembly finishes uploading, the assembly appears in the Schemas list. On your integration account's Overview page, under Components, the Assemblies tile now shows the number of uploaded assemblies.

Create maps

To create an XSLT document you can use as a map, you can use Visual Studio 2015 for creating a BizTalk Integration project by using the Enterprise Integration Pack. In this project, you can build an integration map file, which lets you visually map items between two XML schema files. After you build this project, you get an XSLT document. For limits on map quantities in integration accounts, see Limits and configuration for Azure Logic Apps.

Add maps

After you upload any assemblies that your map references, you can now upload your map.

  1. If you haven't signed in already, sign in to the Azure portal with your Azure account credentials.

  2. If your integration account isn't already open, on the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.

    Find integration account

  3. Select the integration account where you want to add your map, for example:

    Select integration account

  4. On your integration account's Overview page, under Components, select the Maps tile.

    Select "Maps"

  5. After the Maps page opens, choose Add.

    Choose "Add"

Add maps up to 2 MB

  1. Under Add Map, enter a name for your map.

  2. Under Map type, select the type, for example: Liquid, XSLT, XSLT 2.0, or XSLT 3.0.

  3. Keep Small file selected. Next to the Map box, choose the folder icon. Find and select the map you're uploading, for example:

    Upload map

    If you left the Name property empty, the map's file name automatically appears in that property automatically after you select the map file. However, you can use any unique name.

  4. When you're ready, choose OK. After your map file finishes uploading, the map appears in the Maps list.

    Uploaded maps list

    On your integration account's Overview page, under Components, the Maps tile now shows the number of uploaded maps, for example:

    Uploaded maps

Add maps more than 2 MB

Currently, to add larger maps, use the Azure Logic Apps REST API - Maps.

Edit maps

To update an existing map, you have to upload a new map file that has the changes you want. However, you can first download the existing map for editing.

  1. In the Azure portal, find and open your integration account, if not already open.

  2. On the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.

  3. Select the integration account where you want to update your map.

  4. On your integration account's Overview page, under Components, select the Maps tile.

  5. After the Maps page opens, select your map. To download and edit the map first, choose Download, and save the map.

  6. When you're ready to upload the updated map, on the Maps page, select the map you want to update, and choose Update.

  7. Find and select the updated map you want to upload. After your map file finishes uploading, the updated map appears in the Maps list.

Delete maps

  1. In the Azure portal, find and open your integration account, if not already open.

  2. On the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.

  3. Select the integration account where you want to delete your map.

  4. On your integration account's Overview page, under Components, select the Maps tile.

  5. After the Maps page opens, select your map, and choose Delete.

  6. To confirm you want to delete the map, choose Yes.

Next steps