November 19th, 2013, 05:33 PM
CDATA interpretation by the consumer - Results in technical fault in one enviornment
Need your inputs to identify the mystery.
Problem in rendering the CDATA portion in the xml body.
Following cases are able to consume by consumer.
<tag><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?><tag1></tag1>....]]></tag>
In one enviorment alone, the logs are seen as below:
<tag><?xml version="1.0" encoding="UTF-8" standalone="yes"?><tag1></tag1>..</tag>
And this results in technical fault.
<tag><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?><tag1></tag1>...]]></tag]
Thanks in Advance
Last edited by rohit330; November 19th, 2013 at 05:36 PM.
Reason: added the code placeholders
November 19th, 2013, 05:37 PM
Also, what is the normal format needs to be followed? Is that the third one is not a well formatted? Need your inputs for understanding the same.
Originally Posted by rohit330
November 21st, 2013, 09:45 PM
The problem is not with one enviornment. When the logger level is INFO, the issue comes. If it is DEBUG, surprisingly passes thru.
November 21st, 2013, 10:41 PM
First is correct use of CDATA. Second is correct lack of use of CDATA. Third is not correct.
The third looks like someone tried to pass a literal "<[CDATA[<?xml..." string to whatever library they were using to generate the XML. In which case the CDATA shouldn't be there because the library automatically encodes the value and you don't need to worry about it.