You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Zeyn Saigol <ze...@mail.com> on 2002/06/12 17:11:38 UTC

CDATA sections being removed from doc/lit response

I have a service which uses the document / literal style, and so my methods look like this:
public Element[] myMethod(Vector bodyElems)

In the Elements I'm returning, I have some CDATA sections - which are not making it into the XML in the SOAP response. Instead, characters in these sections are escaped and sent as normal text. Could this be changed to allow CDATA sections to be sent unaltered?

I think I've tracked down the point of conversion to SerializationContextImpl, method writeDOMElement

- instead of:
	} else if (child instanceof Text) {
                writeSafeString(((Text)child).getData());
            }
the general logic could be:
            } else if (child instanceof CDATASection) {
                writeString("<![CDATA[" + ((CDATASection)child).getData() + "]]>");
            } else if (child instanceof Text) {
                writeSafeString(((Text)child).getData());
            }

Thanks,
Zeyn
-- 
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup