xml string written inside groovy is being ignored
Summary: Need to use XML tags inside a groovy String. But they are being ignored and considered as empty.
Content (please ensure you mask any confidential information):
Hello,
i have an object function defined as :
// parameters = emailId → String, qPlanNumber → String
def requestBody = [
"NAME": "name1",
"NUMBER": "4343A",
"TYPE": "query",
"PAYLOAD": "<updateEmail><Qnumber>12345</Qnumber><email>$emailId</email><planNumber>$qPlanNumber</planNumber></updateEmail>"
]
println(requestBody);
try{
def response = adf.webServices.getWSDetails.POST(requestBody);
return response.toString();
}
catch(Exception e){
return "Error"+e.getMessage();
}
i need to use few xml tags as strings in the payload as mentioned above. But when i print the requestBody, the tags are not seen.