I am doing a lookup in 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'}`
How should i do this as i need to iterate over the xml received and produce string output.
The above scnario is not possible. In this case if we pass the entire xml then its type will be changed. A better approach while using lookup in dataweave is to pass simple values such as string, integer etc..