Documentation for required says:
If
required()
istrue
, then Javabean property is mapped to an XML schema ele
I looked into the XSD structure that you have posted - and find that you have not used complex type that you have defined for the month , Insteqad of handling it on java code you can mention that all in XSD , and also the minOccur on month - element in your complex type is missing . Please use any standered XSD to java generator , it will do all the java file generation task for you
The convention are as follow -
MinOccur = 0 --> the element can be abscent in input , and can be present
MinOccur = 1 --> the element must be there in input
(but if you use it, then your java generated member will be of list type - list of ENUM for Int )
If you don't write MinOccur in attributes - then it makes the element mandatory , ( then you java generated member will be of simply ENUM for int )
MaxOccur = 1 --> minimum one element can be there in input
(but if you use it, then your java generated member will be of list type - list of ENUM for Int )
MaxOccur = unbound --> only one element can be there in input
(if you use it, then your java generated member will be of list type - list of ENUM for Int )