Reputation: 4991
I have a problem generating the schema for a class I have. What I have is:
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public Class User {
....
@XmlElement(required = true)
protected String name;
....
}
Now, when I generate the schema using schemagen the line refering to that attribute is:
<xs:element name="name" type="xs:string"/>
the minOcurrences attribute is missing, I don't know why it ignores the annotation, any help is greatly appreciated. Also on a separate and unrelated topic, why does schemagen complaint when my class is anotated with JPA annotations? Is there any workaround for this?
Upvotes: 2
Views: 649