XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("BeanWithNillableItem");
XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
boolean itemFound = false;
boolean itemNotNillableFound = false;
for (int x = 0; x < seq.getItems().size(); x++) {
XmlSchemaSequenceMember o = seq.getItems().get(x);
if (o instanceof XmlSchemaElement) {
XmlSchemaElement oe = (XmlSchemaElement) o;
if ("item".equals(oe.getName())) {
itemFound = true;
assertTrue(oe.isNillable());