[英]transform the xml payload in mule 4 using dataweave 2.0
In my case, I've done the XML payload transform using Java in Mule 3.就我而言,我在 Mule 3 中使用Java完成了 XML 有效负载转换。
But in Mule 4, could we be able to transform the xml payload using Dataweave 2.0.但是在 Mule 4 中,我们能否使用Dataweave 2.0 转换 xml 有效载荷。
I have an XML Request and Expected response payload.我有一个 XML 请求和预期响应负载。 But I don't know to transform using Dataweave 2.0
但我不知道使用 Dataweave 2.0 进行转换
Input XML: https://github.com/Manikandan99/demo/blob/master/input_xml_request输入 XML: https://github.com/Manikandan99/demo/blob/master/input_xml_request
Output XML: https://github.com/Manikandan99/demo/blob/master/output_xml Output XML: https://github.com/Manikandan99/demo/blob/master/output_xml
Java code for my logic: https://github.com/Manikandan99/demo/blob/master/transform_xml.java Java 我的逻辑代码: https://github.com/Manikandan99/demo/blob/master/transform_xml.Z93F725A07423FE1C889F448B33D21F46
Note:笔记:
* Difference between the input and output payload is that the value of the DTOStep node should be updated.
* The attribute value of DTOStep is autoincremented from 500 each time.
Please assist me.请帮助我。
In generic terms there are two main ways to resolve this in Mule 4.一般而言,在 Mule 4 中有两种主要方法可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.