You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

xml string written inside groovy is being ignored

in Sales 5 comments

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!