Community
Participate
Working Groups
1.An XmlType class must have a no-arg constructor or a factoryMethod defined. no-arg constructor can be public, protected, or private 2. @XmlType factoryMethod must be a static zero-arg method found in the factoryClass. If the factoryClass is not specified, it is assumed to be the XmlType's class. As far as I can tell these validation messages are the same for MOXy as for generic JAXB.
> no-arg constructor can be public, protected, or private I might be wrong about this, the XmlType javadocs say it needs to be public, but it seems like public, protected or private are supported.
I have added the following schema-based validation : 3. if name is absent (""), namespace cannot be different from package namespace 4. if name is not absent (""), type must be from schema associated with this package
from bug 345317: Validation and content assist are still needed for XmlType (factoryClass, factoryMethod, and propOrder)
*** Bug 345317 has been marked as a duplicate of this bug. ***
When used on an enum, factoryMethod(), factoryClass(), and propOrder() must be ignored (should be warning at least)
Added propOrder validation and content assist for 3.1 M3.
(In reply to comment #5) > When used on an enum, factoryMethod(), factoryClass(), and propOrder() must be > ignored (should be warning at least) This has been fixed in 3.1 M3.
Added validation for: - public or protected (not private) zero-arg constructor or the default constructor - factory method must be specified when factory class is specified for 3.1 RC1. Tracking further validation for factoryClass/factoryMethod in bug 363617 so that this bug can be closed for 3.1.