1
votes

How to convert xml payload to a string in dataweave 2.0?

Thanks Vempati

2

2 Answers

3
votes

The best way would be something like.

output application/java
---
payload.^raw as String

The .^raw returns the underlying input stream then we transform it into a String and return it as a Java Value so the payload is a java.lang.String

2
votes