Skip to Content
1
A D
May 13, 2019 at 02:26 PM

Access CPI resources in groovy script

960 Views Last edit May 13, 2019 at 02:30 PM 3 rev

Hi,

I have added an xsd file in my iFlow .I need to access it in my groovy script. Can anyone advise me. Here is the code snippet I used but it is not working:


import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {

def body = message.getBody(java.lang.String) as String;
body = '';

input_file_path= "xsd/chk1.xsd";

def input = new File(input_file_path).getText('UTF-8')

message.setBody(input);
return message;
}

Attachments

xsdim.png (15.9 kB)