Hi Experts,
I am working on SOAP sync scenario where SAP will be triggering the below XML to CPI.
I have generated the WSDL from eclipse. When imported to CPI message mapping prefix "ns1" is added to the mapping by default due to this mapping is not working and throwing the below error.
Any help/leads will be highly appreciated.
XML Input:
<?xml version="1.0" encoding="utf-8"?>
<ZROOT>
<SAPSLL_PRVSY_S>
<PRVSY>000001</PRVSY>
</SAPSLL_PRVSY_S>
<SAPSLL_PRVSY_S>
<PRVSY>000002</PRVSY>
</SAPSLL_PRVSY_S>
<SAPSLL_PRVSY_S>
<PRVSY>000003</PRVSY>
</SAPSLL_PRVSY_S>
<SAPSLL_PRVSY_S>
<PRVSY>000004</PRVSY>
</SAPSLL_PRVSY_S>
<SAPSLL_PRVSY_S>
<PRVSY>000005</PRVSY>
</SAPSLL_PRVSY_S>
</ZROOT>
Mapping Screenshot and Issue:


I tried the below groovy script just before the message mapping, but no luck.
Groovy:
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import java.io.*;
def Message processData(Message message) {
//Body
def body = message.getBody(java.lang.String) as String;
body = body.replaceAll("<ZROOT>","<nS0:ZROOT xmlns:ns0=\"http://www.example.org/tradegts/\">");
body = body.replaceAll("</ZROOT>","</nS0:ZROOT>");
message.setBody(body);
return message;
}
Regards,Pavan
Request clarification before answering.
Hi Pavan,
please have a look into this thread:
https://answers.sap.com/questions/13086816/message-mapping-namespaces-in-cpi.html
Does that solve your problem?
Regards
Stefan
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 | |
| 5 | |
| 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.