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 com.sap.gateway.ip.core.customdev.util.Message;
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
Thanks
Request clarification before answering.
Hello Dale,
You can follow this blog post: https://blogs.sap.com/2018/03/19/using-java-mappings-in-sap-cloud-platform-integration-cpi/
Regards,
Fatih
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.