dev@jaxb2-commons.java.net

map collections as Objects - not typesafe collections

From: <david_at_davidkarlsen.com>
Date: Mon, 17 Aug 2009 15:11:16 +0200 (CEST)

Hi!

I'm migrating from jaxb1 to jaxb2 - and a issue, since jaxb2 uses typesafe
colletions is:

I have two schemas A and B, these have some "common definitions": the xsd
definitions are the same, but in separate namespaces.

My usecase with jaxb1 was:
Create an instance of class A, copy some elements from B.someElements
collection over to the same structure in A.someElements.
This was possible with jaxb1 because it had Lists of objects, but this is
no longer possible with jaxb2 becuase the collections are now bound to a
given package (e.g. namespace).

I don't design/own the schemas - so I can't edit them - is it possible to
map to Collections of Objects like in JAXB1?



--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com