Skip to content

Instantly share code, notes, and snippets.

@ravitejagrt
Created October 9, 2020 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravitejagrt/9e4172acca1d1d515ca5978686b385dd to your computer and use it in GitHub Desktop.
Save ravitejagrt/9e4172acca1d1d515ca5978686b385dd to your computer and use it in GitHub Desktop.
Convert data to XML with multipel namespaces in root element in dataweave 2.0 Mule 4
%dw 2.0
output application/xml
var attributes = {
"queryParams": {
"countryID": "AV",
"regionID": "AV"
}
}
ns ws http://wwww.informatica.com/loc/ws
ns soapenv http://schemas.xmlsoap.org/soap/envelope
---
{
soapenv#Envelope @('xmlns:ws' : "http://www.informatica.com/loc/ws") : {
soapenv#Header: {},
soapenv#Body: {
'ws:UIML_Address_Validation_US_Operation': {
'ws:Group': {
'ws:COUNTRY_FID': attributes.queryParams.countryID,
'ws:REGION_FID': attributes.queryParams.regionID
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment