Vladan, I doubt it's CXF. Maybe Xerces? Anyway, I would look at the text wrapped inside CDATA. I'm betting there is a character or two that, if not wrapped in CDATA, would render the xml document invalid. Something that might be interpreted as an extra closing tag that really isn't? I would look for something along those lines. Also, I would make sure that JAXB isn't having trouble marshalling your returned data type into a proper xml representation. Just guessing at possibilities since you didn't enclose the doc with the CDATA content. Ron
________________________________ From: Radovanovic, Vladan [mailto:vradovano...@cghtech.com] Sent: Tue 5/26/2009 10:04 PM To: users@cxf.apache.org Subject: RE: When will CXF treat an element as CDATA? Thanks Ron, I suspected I wasn't clear enough the first time. Basically I am trying to find out when does CXF treats data as CDATA and when it does not. That's the part that I don't know. In first instance I have build a web service that returns a fairly complex xml document. That's the instance where CXF surrounds the response with CDATA tag. (I can progressively trim the response document to see exactly what causes this behaviour but I thought I might get a faster response here.) In the second instance I have a very simple simple response and CXF doesn't surround it with CDATA tag. (I'd like to know what exactly do I need to do to see CDATA tag in this instance.) Vladan ________________________________ From: Ron Grimes [mailto:rgri...@sinclairoil.com] Sent: Tue 5/26/2009 5:59 PM To: users@cxf.apache.org Subject: RE: When will CXF treat an element as CDATA? Maybe if you explain why you think the data has to be treated as CDATA, someone might have a better solution. I find it's often better to describe "what" I'm trying to accomplish, instead of "how" I'm trying to accomplish it, since the latter might be wrong. Ron -----Original Message----- From: Radovanovic, Vladan [mailto:vradovano...@cghtech.com] Sent: Tuesday, May 26, 2009 12:26 PM To: users@cxf.apache.org Subject: When will CXF treat an element as CDATA? Please excuse my ignorance but I hope someone can help me out with this simple issue. I have simple web service that's returning xml document as a response. I simply can't figure out what document needs to have in order for CXF to surround that response with <![CDATA[ ]] tag? It seems to me CXF uses XMLStreamWriter.writeCData which is triggered when parser determines that the event is XMLStreamConstants.CDATA but again...what exactly needs to be in that node for parser to treat is as CDATA? TIA