I'm trying to write a DataWeave that would represent this XML:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xsi:xsd="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<AuthenticateResult xmlns="urn:authentication.soap.sforce.com">
<Authenticated>true</Authenticated>
</AuthenticateResult>
</soapenv:Body>
</soapenv:Envelope>
And I'm having a really hard time seeing if there are ns and other XML native syntax values supported via DW, or declare custom variables in DataWeave.
%dw 2.0
output application/xml
ns soapenv http://schemas.xmlsoap.org/soap/envelope/
ns xsi http://www.w3.org/2001/XMLSchema-instance
---
{
soapenv#Envelope
@(xsi#xsd:"http://schemas.xmlsoap.org/soap/envelope/"): {
soapenv#Body: {
AuthenticateResult @(xmlns: "urn:authentication.soap.sforce.com"): {
Authenticated: payload.login
}
}
}
}
my payload is just this, I want it to get updated from either true or false:
{
"login": "true"
}