Skip to content

Commit 1475742

Browse files
author
ecfan
committed
Updates
1 parent b45c55b commit 1475742

1 file changed

Lines changed: 60 additions & 49 deletions

File tree

Lines changed: 60 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,113 @@
11
---
2-
title: Validate XML in enterprise integration workflows
3-
description: Validate XML using schemas in workflows using Azure Logic Apps and the Enterprise Integration Pack.
2+
title: Validate XML in B2B Workflows
3+
description: Learn how to validate XML in B2B workflows using schemas in Azure Logic Apps so you can make sure messages meet trading partner requirements.
44
services: logic-apps
55
ms.suite: integration
66
author: divyaswarnkar
77
ms.author: divswa
8-
ms.reviewer: estfan, azla
8+
ms.reviewers: estfan, azla
99
ms.topic: how-to
10-
ms.date: 01/04/2024
10+
ms.date: 12/09/2025
11+
#Customer intent: As an integration developer who works with Azure Logic Apps, I want to validate XML using schemas before processing messages in B2B workflows.
1112
---
1213

13-
# Validate XML in workflows with Azure Logic Apps
14+
# Validate XML using schemas in B2B workflows with Azure Logic Apps
1415

1516
[!INCLUDE [logic-apps-sku-consumption-standard](../../includes/logic-apps-sku-consumption-standard.md)]
1617

17-
In enterprise integration business-to-business (B2B) scenarios, the trading partners in an agreement often have to make sure that the messages they exchange are valid before any data processing can start. Your logic app workflow can validate XML messages and documents by using the **XML Validation** action and a predefined [schema](logic-apps-enterprise-integration-schemas.md).
18+
In enterprise integration business-to-business (B2B) scenarios, trading partners that communicate with each other based on an agreement need to make sure their messages are valid before any data processing can start.
1819

19-
If you're new to logic apps, review [What is Azure Logic Apps](logic-apps-overview.md)? For more information about B2B enterprise integration, review [B2B enterprise integration workflows with Azure Logic Apps and Enterprise Integration Pack](logic-apps-enterprise-integration-overview.md).
20+
This guide shows how your logic app workflow can validate XML messages and documents using a predefined [schema](logic-apps-enterprise-integration-schemas.md) and the **XML Operations** action that validates XML.
2021

2122
## Prerequisites
2223

23-
* An Azure account and subscription. If you don't have a subscription yet, [sign up for a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
24+
- An Azure account and subscription. [Get a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
2425

25-
* The logic app workflow, blank or existing, where you want to use the **XML Validation** action.
26+
- The logic app resource and workflow where you want to validate XML.
2627

27-
If you have a blank workflow, use any trigger you want. This example uses the Request trigger.
28+
Your workflow must start with a trigger, but you can use any trigger that works for your scenario. For more information, see these [general steps](create-workflow-with-trigger-or-action.md#add-trigger) to add any trigger you want.
2829

29-
* An [integration account resource](logic-apps-enterprise-integration-create-integration-account.md) where you define and store artifacts, such as trading partners, agreements, certificates, and so on, for use in your enterprise integration and B2B workflows. This resource has to meet the following requirements:
30+
The examples in this guide use the [**Request** trigger named **When an HTTP request is received**](../connectors/connectors-native-reqres.md), which waits until an external caller sends a request to the trigger. Alternatively, you can use the [**Schedule** trigger named **Recurrence**](../connectors/connectors-native-recurrence.md).
3031

31-
* Is associated with the same Azure subscription as your logic app resource.
32+
- An [integration account resource](./enterprise-integration/create-integration-account.md) to define and store artifacts for use in your enterprise integration and B2B workflows across multiple logic app resources.
3233

33-
* Exists in the same location or Azure region as your logic app resource where you plan to use the **XML Validation*** action.
34+
- Both your integration account and logic app resource must exist in the same Azure subscription and Azure region.
3435

35-
* If you're using the [**Logic App (Consumption)** resource type](logic-apps-overview.md#resource-environment-differences), your integration account requires the following items:
36+
- The [schema](logic-apps-enterprise-integration-schemas.md) to use for validating XML content.
3637

37-
* The [schema](logic-apps-enterprise-integration-schemas.md) to use for validating XML content.
38+
- Before you start working with XML operations that use artifacts such as schemas in an integration account, you must [link your Consumption logic app](enterprise-integration/create-integration-account.md?tabs=consumption#link-account) or [link your Standard logic app](enterprise-integration/create-integration-account.md?tabs=standard#link-account) to the integration account. You can then use the artifacts across workflows in multiple logic app resources.
3839

39-
* A [link to your logic app resource](logic-apps-enterprise-integration-create-integration-account.md#link-account).
40+
You can optionally add specific artifacts directly to a Standard logic app resource. However, only workflows in the same resource can work with those artifacts.
4041

41-
* If you're using the [**Logic App (Standard)** resource type](logic-apps-overview.md#resource-environment-differences), you don't store schemas in your integration account. Instead, you can [directly add schemas to your logic app resource](logic-apps-enterprise-integration-schemas.md) using either the Azure portal or Visual Studio Code. You can then use these schemas across multiple workflows within the *same logic app resource*.
42+
[!INCLUDE [api-test-http-request-tools-bullet](../../includes/api-test-http-request-tools-bullet.md)]
4243

43-
You still need an integration account to store other artifacts, such as partners, agreements, and certificates, along with using the [AS2](logic-apps-enterprise-integration-as2.md), [X12](logic-apps-enterprise-integration-x12.md), and [EDIFACT](logic-apps-enterprise-integration-edifact.md) operations. However, you don't need to link your logic app resource to your integration account, so the linking capability doesn't exist. Your integration account still has to meet other requirements, such as using the same Azure subscription and existing in the same location as your logic app resource.
44+
If you use a trigger that waits for a request to start the workflow, you need an HTTP request tool to test the trigger and workflow.
4445

45-
> [!NOTE]
46-
> Currently, only the **Logic App (Consumption)** resource type supports [RosettaNet](logic-apps-enterprise-integration-rosettanet.md) operations.
47-
> The **Logic App (Standard)** resource type doesn't include [RosettaNet](logic-apps-enterprise-integration-rosettanet.md) operations.
46+
## Add a validate XML action
4847

49-
## Add XML validation action
48+
1. In the [Azure portal](https://portal.azure.com), open the logic app resource. Open your workflow in the designer.
5049

51-
1. In the [Azure portal](https://portal.azure.com), open your logic app and workflow in designer view.
50+
1. On the designer, follow these [general steps](create-workflow-with-trigger-or-action.md?tabs=standard#add-action) to add the **XML Operations** action with the name that matches your workflow type:
5251

53-
1. If you have a blank logic app that doesn't have a trigger, add any trigger you want. This example uses the Request trigger. Otherwise, continue to the next step.
52+
| Workflow | Action name |
53+
|----------|-------------|
54+
| Consumption | **XML Validation** |
55+
| Standard | **Validate XML** |
5456

55-
To add the Request trigger, in the designer search box, enter `HTTP request`, and select the Request trigger named **When an HTTP request is received**.
57+
1. To view the source options for your XML content, follow these steps:
5658

57-
1. Under the step in your workflow where you want to add the **XML Validation** action, choose one of the following steps:
59+
1. Select inside the **Content** box, then select an option:
5860

59-
For a Consumption logic app, choose one of the following steps:
61+
| XML content source | Select | Description |
62+
|--------------------|--------|-------------|
63+
| Output from a previous workflow operation | Lightning icon | Open the dynamic content list so you can select the output from the trigger or a previous action. |
64+
| Output from an expression | Function icon | Open the expression editor so you can use an expression function or build an expression to produce the XML content. |
6065

61-
* To add the **XML Validation** action at the end of your workflow, select **New step**.
66+
This example continues with the dynamic content list, for example:
6267

63-
* To add the **XML Validation** action between existing steps, move your pointer over the arrow that connects those steps so that the plus sign (**+**) appears. Select that plus sign, and then select **Add an action**.
68+
:::image type="content" source="./media/logic-apps-enterprise-integration-xml-validation/open-dynamic-content-list.png" alt-text="Screenshot shows the Azure portal, workflow designer, selected validate XML action, cursor in Content box, and opened dynamic content list." lightbox="./media/logic-apps-enterprise-integration-xml-validation/open-dynamic-content-list.png":::
6469

65-
For a Standard plan-based logic app, choose a step:
70+
1. From the dynamic content list, select the output with the XML content from the operation you want.
6671

67-
* To add the **XML Validation** action at the end of your workflow, select the plus sign (**+**), and then select **Add an action**.
72+
This example selects the **Body** output from the trigger named **When an HTTP request is received**.
6873

69-
* To add the **XML Validation** action between existing steps, select the plus sign (**+**) that appears between those steps, and then select **Add an action**.
74+
1. To specify the schema for validation, follow the steps for your workflow type:
7075

71-
1. Under **Choose an operation**, select **Built-in**. In the search box, enter `xml validation`. From the actions list, select **XML Validation**.
76+
**Consumption**
7277

73-
1. To specify the XML content for validation, click inside the **Content** box so that the dynamic content list appears.
78+
From the **Schema Name** list, select the schema from the linked integration account.
7479

75-
The dynamic content list shows property tokens that represent the outputs from the previous steps in the workflow. If the list doesn't show an expected property, check the trigger or action heading in the list and whether you can select **See more**.
80+
**Standard**
7681

77-
For a Consumption logic app, the designer looks like this example:
82+
1. From the **Schema source** list, select **IntegrationAccount** or **LogicApp**.
7883

79-
![Screenshot showing multi-tenant designer with opened dynamic content list, cursor in "Content" box, and opened dynamic content list.](./media/logic-apps-enterprise-integration-xml-validation/open-dynamic-content-list-multi-tenant.png)
84+
This example selects **IntegrationAccount**.
8085

81-
For a Standard plan-based logic app, the designer looks like this example:
86+
1. From the **Schema name** list, select the schema.
8287

83-
![Screenshot showing single-tenant designer with opened dynamic content list, cursor in "Content" box, and opened dynamic content list](./media/logic-apps-enterprise-integration-xml-validation/open-dynamic-content-list-single-tenant.png)
88+
1. When you're done, save your workflow.
8489

85-
1. From the dynamic content list, select the property token for the content you want to validate.
90+
You're now finished with setting up your validate XML action. In a real world app, you might want to store the validated data in a line-of-business (LOB) app such as SalesForce. To send the validated output to Salesforce, add a **Salesforce** action.
8691

87-
This example selects the **Body** token from the trigger.
92+
## Test your workflow
8893

89-
1. To specify the schema to use for validation, open the **Schema Name** list, and select the schema that you previously added.
94+
Confirm that the workflow works the way that you expect.
9095

91-
1. When you're done, make sure to save your logic app workflow.
96+
1. On the designer, select the trigger named **When an HTTP request is received**.
9297

93-
You're now finished setting up your **XML Validation** action. In a real world app, you might want to store the validated data in a line-of-business (LOB) app such as SalesForce. To send the validated output to Salesforce, add a Salesforce action.
98+
1. From the **HTTP URL** property, copy and save the endpoint URL for the trigger.
9499

95-
1. To test your validation action, trigger and run your workflow. For example, for the Request trigger, send a request to the trigger's endpoint URL.
100+
1. On the designer toolbar. select **Run** > **Run**.
96101

97-
The **XML Validation** action runs after your workflow is triggered and when XML content is available for validation.
102+
1. To fire the **Request** trigger, use your preferred HTTP request tool to send a request with the XML content to the trigger's endpoint URL.
98103

99-
## Next steps
104+
The validate XML action runs after the trigger fires and XML content is available for validation.
100105

101-
* [Add schemas for XML validation in Azure Logic Apps](logic-apps-enterprise-integration-schemas.md)
102-
* [Transform XML for workflows in Azure Logic Apps](logic-apps-enterprise-integration-transform.md)
106+
1. To review the status for each operation, inputs, and outputs, follow the steps in [Review workflow run history](view-workflow-status-run-history.md#review-workflow-run-history).
107+
108+
## Related content
109+
110+
- [Add schemas for XML validation in Azure Logic Apps](logic-apps-enterprise-integration-schemas.md)
111+
- [Transform XML for workflows in Azure Logic Apps](logic-apps-enterprise-integration-transform.md)
112+
- [B2B enterprise integration workflows with Azure Logic Apps](logic-apps-enterprise-integration-overview.md)
113+
- [What is Azure Logic Apps](logic-apps-overview.md)

0 commit comments

Comments
 (0)