on 09-13-2016 3:29 PM
Hello!
I have ABAP Proxy to JDBC asynchronous scenario.
SAP PI 7.4 single stack.
Elements with line feed (i.e. <BPFullName>Sample Name
</BPFullName> ) are sometimes sent from sender system.
These line feed symbols are converted to real line feeds after mapping (instead of 
 ).
Our JDBC receiver gives error in this case because SQL statement becomes separated into two lines:
java.sql.SQLException: Found a quote for which there is no matching quote.
I know that this issue is solved when value is escaped by CData like this:
<fname><![CDATA[line_1
line_2]]></fname>
Please tell me how to wrap some element into CDATA using graphical mapping.
Best regards,
Andrey Petin
Hi Andrey!
Maybe I don't understand your question right but why not to just concat your field data with "![CDATA[" and "]]" in your mapping?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrey!
Then develop reusable UDF for current and future requirements :
public String wrapWithCDATA(String srcStr, Container container) throws StreamTransformationException {
if (srcStr == null || srcStr.trim().equals("") || srcStr.trim().startsWith("![CDATA["))
return srcStr;
else
return "![CDATA[" + srcStr.trim() + "]]";
}
Regards, Evgeniy.
Hi Andrey,
You can concat the original value with "<![CDATA[" and "]]>" in grapical map to add the Cdata segment.
Hope this will help.
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andrey,
Instead of CDATA try the below approach.
scn.sap.com/people/jyothi.anagani/blog/2010/06/17/convert-the-input-xml-to-string-in-pi-71-using-standard-graphical-mapping
This is will return entire XML as string..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.