I prepared complexType, an enum with two attributes:
<xsd:complexType name="Action"> <xsd:simpleContent> <xsd:restriction base="xsd:string"> <xsd:enumeration value="A"/> <xsd:enumeration value="B"/> <xsd:enumeration value="C"/> </xsd:restriction> </xsd:simpleContent> <xsd:attribute name="attrA" type="xsd:string" /> <xsd:attribute name="attrB" type="xsd:string" /> </xsd:complexType> The problem is, JAXB prevents me from creating Java classes for that code, I get the following error:
When <simpleContent> is used, the base type must be a complexType whose content type is simple, or, only if restriction is specified, a complex type with mixed content and emptiable particle, or, only if extension is specified, a simple type. 'string' satisfies none of these conditions. Online validator showed me my code is corrent one. How do I change this to make xjc convert my schema definition?
No comments:
Post a Comment