Skip to Content

Re-using Java mapping from SAP PI in SAP CPI using Groovy

Hi Experts,

Is it possible to reuse older java mappings from PI in CPI by calling them in groovy?

i want to reuse my old java mappings from within PI/PO in CPI.

I have imported the jar files into CPI and i am trying to call the mapping class from within groovy.

Here is my groovy code;


import java.util.HashMap;

import Tester.TestBO; // importing the java class from jar

def Message processData(Message message)


//Body as string def body = message.getBody(java.lang.String) as String;

def javaMapping = new TestBO(); // reference jar class

def result = javaMapping.transform(body); // calling the transform method

message.setBody(result); // setting the body

return message; // returning the message that should be mapped


With this i am getting the following error;

"No signature of method: Tester.TestBO.transform() is applicable for argument types: (java.lang.String) values; (my XML structure i want to map) "

Any help would be appreciated


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers