在 Dataweave Mule 中查找
Lookup in Dataweave Mule
我正在 dataweave 中进行查找
lookup("myflow",$)
I am passing entire xml to the flow called. The data received in the flow is of type
'java.util.LinkedHashMap'. I am trying to put a ForEach processor and specify the xpath3 in collection. This get's errored out with message:
Root Exception stack trace: java.lang.IllegalArgumentException:
Could not transform input of type 'java.util.LinkedHashMap' to a
supported one. Supported types are
'SimpleDataType{type=org.w3c.dom.Document, mimeType='/',
encoding='null'},SimpleDataType{type=org.w3c.dom.Node, mimeType='/',
encoding='null'}`
我应该怎么做,因为我需要遍历接收到的 xml 并生成字符串输出。
以上情况是不可能的。在这种情况下,如果我们传递整个 xml 那么它的类型就会改变。在 dataweave 中使用查找时,更好的方法是传递简单的值,例如字符串、整数等。
我正在 dataweave 中进行查找
lookup("myflow",$)
I am passing entire xml to the flow called. The data received in the flow is of type 'java.util.LinkedHashMap'. I am trying to put a ForEach processor and specify the xpath3 in collection. This get's errored out with message:
Root Exception stack trace: java.lang.IllegalArgumentException: Could not transform input of type 'java.util.LinkedHashMap' to a supported one. Supported types are 'SimpleDataType{type=org.w3c.dom.Document, mimeType='/', encoding='null'},SimpleDataType{type=org.w3c.dom.Node, mimeType='/', encoding='null'}`
我应该怎么做,因为我需要遍历接收到的 xml 并生成字符串输出。
以上情况是不可能的。在这种情况下,如果我们传递整个 xml 那么它的类型就会改变。在 dataweave 中使用查找时,更好的方法是传递简单的值,例如字符串、整数等。