Moxy and Reference Impl schemas do not match [message #1116106] |
Tue, 24 September 2013 21:32  |
Eclipse User |
|
|
|
I've been trying to use Moxy for some of the extensions but have found that as soon as I drop Moxy in, I lose everything that was working. This may be something simple. I'm hoping. But definitely I find it weird that simply by changing jaxb implementations, I get completely different (and in the case of Moxy, what I consider incorrect) schemas.
It all revolves around inheritance on a collection. Here's the class that we start with. It has a collection of an abstract class.
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name = "form")
public class FormType {
...
@XmlElementRef
public List<FormElement> getFormElements() {
}
This abstract class has one notable thing: formElements can have collections of formElements. However, I've commented that entire part out and it doesn't seem to make a difference. I should probably remove it from this code but want to keep it to be as complete as possible.
@XmlSeeAlso(value = {UiFormElement.class})
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public abstract class FormElement implements Serializable, DoesGroovy {
...
@XmlElementRef
public List<FormElement> getFormElements() {
}
Another layer of abstraction. This is the one that points to the concrete classes that Moxy seems to be missing.
@XmlSeeAlso(value = {TabSheetUiFormElement.class, TabUiFormElement.class, ...})
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public abstract class UiFormElement extends FormElement {
...
}
An example of how each of the concrete subclasses are annotated.
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name = "tabsheet")
public class TabSheetUiFormElement extends UiFormElement implements FormComponent {
same for others in the SeeAlso list above.
The reference implementation "sees" all of these concrete subclasses of UiFormElement and shows them in the schema. Moxy does not.
Is there anything obviously wrong here? I'm happy to try and post the cleaned-up versions of the schemas (minus all the dozens of simple fields that I highly doubt would be anything but cruft to this issue).
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04557 seconds