users@jaxb.java.net

Re: How can I persist the content of "xsd:any" tag ?

From: bastral <baptistebesson_at_yahoo.fr>
Date: Tue, 3 Jul 2007 04:40:28 -0700 (PDT)

Hello Aleksei,

I uploaded a zip containing a simplified version of my schema with the two
classes generated when I run wsimport (see README)
ManagementDomain.xml is the xml file which validates ManagementDomain.xsd
and ManagementDomain.wsdl is the file used by wsimport.
It would be great for me if you could tell me what to do to persist the
content of vendorExtension in the database (for being able to retrieve it on
a later request).

I indeed read about HyperJaxb but as it seems to only work with Hibernate (I
started with the default netbeans/toplink under Sun Application Server 9), I
didn't use it.
Anyway for what I have to do I can manage to add persistence by hand for the
moment.

Thank you very much for your help :)
http://www.nabble.com/file/p11410441/sample-bastral.zip sample-bastral.zip


Aleksei Valikov wrote:
>
> Hi.
>
> My question is : how can I store the content of vendorExtension element
> into
>> the database. There can be as many element as the user want under this
>> element and if I try this code with just.
>
>
> EJB3 can't handle this "as is" as it does not support heterogeneous
> collections. You have to convert the contents into something mappable by
> EJB3 like strings or serializables.
>
> If you wish you may send me your schemas and I'll run Hyperjaxb3 over
> them.
> Hyperjaxb3 is a JAXB plugin which adds EJB3 annotations to the generated
> code. It is also capable of adapting complex cases like yours.
>
> The 0.2 version is ready to be released, we're working on the
> documentation.
>
> Bye.
> /lexi
>
>

-- 
View this message in context: http://www.nabble.com/How-can-I-persist-the-content-of-%22xsd%3Aany%22-tag---tf4015177.html#a11410441
Sent from the java.net - jaxb users mailing list archive at Nabble.com.