【问题标题】:How to convert xml to EDI x12 855 message in logic app?如何在逻辑应用程序中将 xml 转换为 EDI x12 855 消息?
【发布时间】:2018-07-09 01:15:51
【问题描述】:

如何在逻辑应用程序中将 xml 转换为 EDI x12 855 消息? 我使用了 Transform XML 然后我使用了 Encode 组件在那里我得到了输出 enter image description here

当我尝试在逻辑应用流程中添加解码组件时,它会显示如下错误: 无法在“1”行和“1535”列的操作“Decode_X12_message”输入中处理模板语言表达式:“模板语言函数“base64ToString”期望其参数为字符串。提供的值是“Null”类型。请参阅https://aka.ms/logicexpressions#base64ToString 了解使用详情。'。我在解码组件的代码视图中使用了“@{base64ToString(item()?[body('Encode_to_X12_message_by_agreement_name')?['Payload']])}”。 我该如何解决这个问题以及如何从 XML 输入生成 EDi x12 855?请提供要使用的工作流组件和特定组件的工作流定义语言。

这是我的逻辑应用工作流程 enter image description here

【问题讨论】:

  • 我想获取 xml 作为输入,我想将其转换为 EDI x12 855 消息。请为此提供逻辑应用工作流。

标签: azure-logic-apps workflow-definition-language


【解决方案1】:

你为什么用item(),你只需要:

@{base64ToString(body('Encode_to_X12_message_by_agreement_name')
?['Payload'])}

【讨论】:

  • 当我使用 compose before decode 组件时。现在它显示像 InvalidTemplate 这样的错误。无法在“1”行和“1535”列的操作“Decode_X12_message”输入中处理模板语言表达式:“模板语言表达式 'base64ToString(body('Encode_to_X12_message_by_agreement_name')?[outputs('Compose_2')])' 不能因为财产而被评估。
  • 同样的错误?试试@xml(base64ToBinary(items('Encode_to_X12_message_by_agreement_name')?['Payload']))
  • 它显示如下错误:Unable to process template language expressions in action 'Decode_X12_message' input at line '1' and column '1534': 'The template language function 'item' must not have any parameters .'.
  • 对不起,我复制了你的消息,正确的必须是@body('Encode_to_X12_message_by_agreemen‌​t_name')?['Payload']
  • 它显示一个错误,如:请求内容为空或解码组件中的空。请帮助我如何创建逻辑应用流程以将 xml 输入生成到 EDI x12 855
猜你喜欢
  • 2018-03-20
  • 1970-01-01
  • 2020-02-19
  • 2013-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-10
相关资源
最近更新 更多