protected Union createUnion(QName name, XmlSchemaChoice choice, QName defaultName,
QName schematypeName)
throws Exception {
Union corbaUnion = null;
if (recursionMap.get(name) instanceof Union) {
corbaUnion = (Union)recursionMap.get(name);
if (corbaUnion != null) {
return corbaUnion;
}
}
corbaUnion = new Union();
corbaUnion.setName(name.getLocalPart());
corbaUnion.setQName(name);
corbaUnion.setType(schematypeName);
String id = REPO_STRING + name.getLocalPart().replace('.', '/') + IDL_VERSION;
corbaUnion.setRepositoryID(id);
//Set Integer as Discriminator
corbaUnion.setDiscriminator(CorbaConstants.NT_CORBA_LONG);
// add to the list of possible recursive types
recursionMap.put(name, corbaUnion);
List fields = processContainerAsMembers(choice, defaultName, schematypeName);