users@jaxb.java.net

Serialize anyType

From: ibsscott <sallan1000_at_aol.com>
Date: Thu, 28 Feb 2008 14:23:43 -0800 (PST)

My jaxb object is serializable, but xs:any creates an org.w3c.dom.Element
which is not serializable, so therefore I cannot persist my jaxb object. I
want to persist the entire object and not pull it apart first and store the
Element separately as a String. I'm pretty sure I can't use another type
such as xs:string because I would predict that the xml tags would get
escaped ie &lt; %gt; Does anyone have any suggestions or strategies.
Would any sort of DataTypeConverter work? Is there an alternative to Element
that can be substituted which is serializable and will marshal/unmarshal
correctly? I'd also like to know how hyperjaxb3 handles this. I have
written my own custom EJB3 plugin which I've had since before hyperjaxb3 was
born and would prefer to use that for now.
 
    <xs:complexType name="genericTransaction">
           <xs:sequence>
                <xs:element name="program" type="xs:string"/>
                <xs:any processContents="skip"/>
             </xs:sequence>
     </xs:complexType>
-- 
View this message in context: http://www.nabble.com/Serialize-anyType-tp15747486p15747486.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.