maxOccurs, minOccurs, anonymous);
}
private CorbaTypeImpl processOMGUnion(XmlSchemaComplexType complex, QName defaultName) throws Exception {
QName name;
Union corbaUnion = null;
QName schematypeName = checkPrefix(complex.getQName());
if (schematypeName == null) {
schematypeName = defaultName;
name = createQNameCorbaNamespace(defaultName.getLocalPart() + "Type");
} else {
name = createQNameCorbaNamespace(schematypeName.getLocalPart());
}
corbaUnion = new Union();
corbaUnion.setName(name.getLocalPart());
corbaUnion.setQName(name);
String id = REPO_STRING + name.getLocalPart().replace('.', '/') + IDL_VERSION;
corbaUnion.setRepositoryID(id);
corbaUnion.setType(schematypeName);
XmlSchemaSequence stype = (XmlSchemaSequence)complex.getParticle();
Iterator it = stype.getItems().getIterator();
XmlSchemaParticle st1 = (XmlSchemaParticle)it.next();
XmlSchemaParticle st2 = (XmlSchemaParticle)it.next();
XmlSchemaElement discEl = null;
XmlSchemaChoice choice = null;
if (st1 instanceof XmlSchemaElement) {
discEl = (XmlSchemaElement)st1;
choice = (XmlSchemaChoice)st2;
} else {
discEl = (XmlSchemaElement)st2;
choice = (XmlSchemaChoice)st1;
}
CorbaTypeImpl disctype = convertSchemaToCorbaType(discEl.getSchemaType(), discEl.getQName(), discEl
.getSchemaType(), null, false);
corbaUnion.setDiscriminator(disctype.getQName());
List fields = processContainerAsMembers(choice, defaultName, schematypeName);
List<String> caselist = new ArrayList<String>();