【发布时间】:2015-12-19 07:19:23
【问题描述】:
我尝试访问来自 DataWeave 的 xml 下的元素。它给我返回空值。
DataWeave 脚本是
%dw 1.0
%namespace ns0 urn:abc:dbc:Components
%output text/xml
---
ItemFee:{
product_id:flowVars."Dept_id",
TotalFees: sum payload.ns0#ItemResponse.ns0#Fees.*ns0#Fee.ns0#Fee
}
在这个数据编织之后,我有记录器节点和下面的消息。
#[message.payload.ItemFee.TotalFees]
我说错了
Execution of the expression "message.payload.ItemFee.TotalFees" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: WeaveMessageProcessor$WeaveOutputHandler
我想在这里再说一点。当我在“转换消息”之后立即在记录器中给出以下文本时。在控制台中打印的消息没有问题。但我无法访问 xml 消息中的元素。#[message.payloadAs(java.lang.String)]
【问题讨论】:
标签: mule esb mule-component dataweave