[jboss-user] [JBossWS] - Re: String being escaped

nicksyd do-not-reply at jboss.com
Thu Jul 30 19:24:56 EDT 2009


This is my finding so far after debugging through the jboss-xb-binding source code

The class MarshallerImpl() is the core class that does the serialization of the result from the objects to XML. The main method to do the serialization is called marshal(...) [ which have got several method implementation ]. The marshal (..) method calls an internal method (which is a private method) called marshallInternal(..). Basically what the marshallInternal(..) method does is it serialize the created "elements" and "value" to a String representation and it uses a class called ContentWriter (which is an implementation of org.xml.sax.ContentHandler interface), inside ContentWriter the characters(..) method implementation "normalize" all string character, this is where the problem lies as it converts all different character such as <,>,&,\," to it's respective decoded style &lt;,&gt;,&amp;,&apos;,&quot;



The question that I'm wondering is this a bug , a feature or it's intentionally put in as a JBoss implementation ?

I tried the same sample in WebSphere and the output inside the  element is not being escaped. 

Can anybody point me to the right direction ?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247128#4247128

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247128



More information about the jboss-user mailing list