users@jaxb.java.net

Duplicate classes and schema types

From: Kevin and Louise . <kevin_pepper_at_hotmail.com>
Date: Tue, 11 Jan 2011 16:10:47 +0000

Hi,
 
I have a number of schemas that include some common types - hence when I run xjc on them I get the same classes repeated in different packages. If I run the compilation on all schemas at once xjc complains about duplicate classes.
If I pull them all out into a common.xsd schema and include that in the others then I think that would solve the problem but I would like to avoid changing the schemas if possible.
Anyone know of a good way to provide a generic interface to these duplicate generated classes that doesn't involve schema changes/editing the classes? Or a way of only generating one of each duplicated type?
 
Cheers.