Groovy - How to remove something from incoming payload Code Example

The code for How to remove something from incoming payload

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;

def Message processData(Message message)
{
    def removal=message.getBody(java.lang.String) as String;
    removal=removal.replace(/<?xml version="1.0" encoding="UTF-8"?>/,"");
    message.setBody(removal);
    return message;
}
Code by Reddy MS, on February 7, 2023 13:28

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.