so this is my first question. :)
I try to generate java classes from a xsd file.
So my Problem is the following. Somehow jaxb won't generate a java class for the simple type "Test".
I have two attributes within a complex type that i am interested in "Art" and "Nummer"
<xs:attribute name="Art" use="required">
<xs:annotation>
<xs:documentation>Darf ausschließlich die Werte "BEL" (BEL-Leistung), "NBL"(andere, nicht in der BEL enthaltene Leistung), "EDM" (Edelmetalle oder -legierungen), "MAT" (alle anderen Materialien) oder "RBT" (Rabatt) enthalten. Jede Art kann mehrmals auftreten.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="Positionsart"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Nummer" use="optional">
<xs:annotation>
<xs:documentation>Ausschließlich anzugeben, wenn Art="BEL". Es sind ausschließlich die offiziellen BEL-Nummern zu verwenden. BEL-Nummern müssen vierstellig übermittelt werden. Das Feld wird nicht übermittelt, wenn Art ungleich BEL ist.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="Test"/>
</xs:simpleType>
</xs:attribute>
The types are both defined at the end of the xsd:
<xs:simpleType name="Positionsart">
<xs:simpleType name="Test">
There is more in those two types but stackoverflow told me that it would be to much code. :)
But you can have a look at the files here:
https://www.dropbox.com/sh/u0j58gd1jo98qrn/L2Yw_-psOw
This is how the beginning of the class looks like
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class Position {
@XmlAttribute(name = "Art", required = true)
protected Positionsart art;
@XmlAttribute(name = "Nummer", required = true)
protected String nummer;
As you can see, Art is a Positionsart type like it is specified in the xsd but Number is not a Test type it is just a String.
I don't understand what the issue is. The only difference between the two attributes is that the one is required and the other is optinal, but I tried to change that already.
Also I thought that there might be a problem with the naming. The SimpleType "Test" was before named BEL2 so I tried changing the name.
Furthermore I found that in the beginning there is a dead link to a namespace, first of all the namespace is not used in this document and second of all I tried to generate the classes without this namespace.
To generate the classes I opened the command line tool, navigated to the right location and typed xjc Laborabrechnungsdaten.xsd. My Java variables are in place.
I hope someone has a suggestion.
Thanks in advance. :)