在 Azure 逻辑应用中处理具有 UNH2.5 段的 EDIFACT 文档Handle EDIFACT documents with UNH2.5 segments in Azure Logic Apps

如果 EDIFACT 文档中存在 UNH 2.5 段,则将使用该段进行架构查找。If a UNH2.5 segment exists in an EDIFACT document, the segment is used for schema lookup. 例如,在此示例 EDIFACT 消息中,UNH 字段为 EAN008For example, in this sample EDIFACT message, the UNH field is EAN008:

UNH+SSDD1+ORDERS:D:03B:UN:EAN008

若要处理此消息,请执行下面所述的这些步骤:To handle this message, follow these steps described below:

  1. 更新架构。Update the schema.

  2. 检查协议设置。Check the agreement settings.

更新架构Update the schema

若要处理消息,你需要部署具有 UNH2.5 根节点名称的架构。To process the message, you need to deploy a schema that has the UNH2.5 root node name. 例如,示例 UNH 字段的架构根名称为 EFACT_D03B_ORDERS_EAN008For example, the schema root name for the sample UNH field is EFACT_D03B_ORDERS_EAN008. 对于具有不同 UNH2.5 段的每个 D03B_ORDERS,你都需要部署一个架构。For each D03B_ORDERS that has a different UNH2.5 segment, you have to deploy an individual schema.

将架构添加到 EDIFACT 协议Add schema to EDIFACT agreement

EDIFACT 解码EDIFACT Decode

若要解码传入消息,请在 EDIFACT 协议的接收设置中设置架构:To decode the incoming message, set up the schema in the EDIFACT agreement's receive settings:

  1. Azure 门户中,打开你的集成帐户。In the Azure portal, open your integration account.

  2. 将架构添加到你的集成帐户。Add the schema to your integration account.

  3. 在 EDIFACT 协议的接收设置中配置架构。Configure the schema in the EDIFACT agreement's receive settings.

  4. 选择 EDIFACT 协议,并选择“编辑为 JSON” 。Select the EDIFACT agreement, and select Edit as JSON. 将 UNH 2.5 值添加到接收协议的 schemaReferences 部分:Add the UNH2.5 value to the Receive Agreement's schemaReferences section:

    将 UNH 2.5 添加到接收协议

EDIFACT 编码EDIFACT Encode

若要对传入消息进行编码,请在 EDIFACT 协议发送设置中配置架构To encode the incoming message, configure the schema in the EDIFACT agreement send settings

  1. Azure 门户中,打开你的集成帐户。In the Azure portal, open your integration account.

  2. 将架构添加到你的集成帐户。Add the schema to your integration account.

  3. 在 EDIFACT 协议的发送设置中配置架构。Configure the schema in the EDIFACT agreement's send settings.

  4. 选择 EDIFACT 协议,并单击“编辑为 JSON” 。Select EDIFACT agreement and click Edit as JSON. 在发送协议 schemaReferences 中添加 UNH2.5 值Add UNH2.5 value in the Send Agreement schemaReferences

  5. 选择 EDIFACT 协议,并选择“编辑为 JSON” 。Select the EDIFACT agreement, and select Edit as JSON. 将 UNH 2.5 值添加到发送协议的 schemaReferences 部分:Add the UNH2.5 value to the Send Agreement's schemaReferences section:

    将 UNH2.5 添加到发送协议

后续步骤Next steps