title | description | services | ms.suite | author | ms.author | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|---|---|---|---|
Validate XML with schemas |
Add schemas to validate XML documents in Azure Logic Apps with Enterprise Integration Pack |
logic-apps |
integration |
divyaswarnkar |
divswa |
jonfan, estfan, logicappspm |
article |
02/06/2019 |
To check that documents use valid XML and have the expected data in the predefined format for enterprise integration scenarios in Azure Logic Apps, your logic app can use schemas. A schema can also validate messages that logic apps exchange in business-to-business (B2B) scenarios.
For limits related to integration accounts and artifacts such as schemas, see Limits and configuration information for Azure Logic Apps.
-
An Azure subscription. If you don't have a subscription, sign up for a free Azure account.
-
An integration account where you store your schemas and other artifacts for enterprise integration and business-to-business (B2B) solutions.
If your schema is 2 MB or smaller, you can add your schema to your integration account directly from the Azure portal. However, if your schema is bigger than 2 MB but no bigger than the schema size limit, you can upload your schema to an Azure storage account. To add that schema to your integration account, you can then link to your storage account from your integration account. For this task, here are the items you need:
-
Azure storage account where you create a blob container for your schema. Learn how to create a storage account.
-
Blob container for storing your schema. Learn how to create a blob container. You need your container's content URI later when you add the schema to your integration account.
-
Azure Storage Explorer, which you can use for managing storage accounts and blob containers. To use Storage Explorer, choose either option here:
-
In the Azure portal, find and select your storage account. From your storage account menu, select Storage Explorer.
-
For the desktop version, download and install Azure Storage Explorer. Then, connect Storage Explorer to your storage account by following the steps in Get started with Storage Explorer. To learn more, see Quickstart: Create a blob in object storage with Azure Storage Explorer.
-
-
You don't need a logic app when creating and adding schemas. However, to use a schema, your logic app needs linking to an integration account where you store that schema. Learn how to link logic apps to integration accounts. If you don't have a logic app yet, learn how to create logic apps.
-
Sign in to the Azure portal with your Azure account credentials.
-
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.
-
Select the integration account where you want to add your schema, for example:
-
On your integration account's Overview page, under Components, select the Schemas tile.
-
After the Schemas page opens, choose Add.
Based on your schema (.xsd) file's size, follow the steps for uploading a schema that's either up to 2 MB or more than 2 MB, up to 8 MB.
-
Under Add Schema, enter a name for your schema. Keep Small file selected. Next to the Schema box, choose the folder icon. Find and select the schema you're uploading, for example:
-
When you're ready, choose OK.
After your schema finishes uploading, the schema appears in the Schemas list.
To add larger schemas, you can upload your schema to an Azure blob container in your Azure storage account. Your steps for adding schemas 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
-
Open Azure Storage Explorer. In the Explorer window, expand your Azure subscription if not already expanded.
-
Expand Storage Accounts > {your-storage-account} > Blob Containers. Select your blob container.
-
From your blob container's shortcut menu, select Set Public Access Level.
-
If your blob container has at least public access, choose Cancel, and follow these steps later on this page: Upload to containers with public access
-
If your blob container doesn't have public access, choose Cancel, and follow these steps later on this page: Upload to containers without public access
-
-
Upload the schema to your storage account. In the right-hand window, choose Upload.
-
After you finish uploading, select your uploaded schema. On the toolbar, choose Copy URL so that you copy the schema's URL.
-
Return to the Azure portal where the Add Schema 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 Schema box.
-
In the Content URI box, paste your schema's URL. Finish adding your schema.
After your schema finishes uploading, the schema appears in the Schemas list. On your integration account's Overview page, under Components, the Schemas tile now shows the number of uploaded schemas.
-
Upload the schema to your storage account. In the right-hand window, choose Upload.
-
After you finish uploading, generate a shared access signature (SAS) for your schema. From your schema's shortcut menu, select Get Shared Access Signature.
-
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.
-
Return to the Azure portal where the Add Schema pane is open. Choose Large file.
The Content URI box now appears, rather than the Schema box.
-
In the Content URI box, paste the SAS URI you previously generated. Finish adding your schema.
After your schema finishes uploading, the schema appears in the Schemas list. On your integration account's Overview page, under Components, the Schemas tile now shows the number of uploaded schemas.
To update an existing schema, you have to upload a new schema file that has the changes you want. However, you can first download the existing schema for editing.
-
In the Azure portal, find and open your integration account, if not already open.
-
On the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.
-
Select the integration account where you want to update your schema.
-
On your integration account's Overview page, under Components, select the Schemas tile.
-
After the Schemas page opens, select your schema. To download and edit the schema first, choose Download, and save the schema.
-
When you're ready to upload the updated schema, on the Schemas page, select the schema you want to update, and choose Update.
-
Find and select the updated schema you want to upload. After your schema file finishes uploading, the updated schema appears in the Schemas list.
-
In the Azure portal, find and open your integration account, if not already open.
-
On the main Azure menu, select All services. In the search box, enter "integration account". Select Integration accounts.
-
Select the integration account where you want to delete your schema.
-
On your integration account's Overview page, under Components, select the Schemas tile.
-
After the Schemas page opens, select your schema, and choose Delete.
-
To confirm that you want to delete the schema, choose Yes.