TypeCode discTC = getTypeCode(orb, unionType.getDiscriminator(), typeMaps);
Map<String, UnionMember> members = new LinkedHashMap<String, UnionMember>();
List<Unionbranch> branches = unionType.getUnionbranch();
for (Iterator<Unionbranch> branchIter = branches.iterator(); branchIter.hasNext();) {
Unionbranch branch = branchIter.next();
List<CaseType> cases = branch.getCase();
for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
CaseType cs = caseIter.next();
UnionMember member = new UnionMember();
member.name = branch.getName();
member.type = getTypeCode(orb, branch.getIdltype(), typeMaps);
member.label = orb.create_any();
// We need to insert the labels in a way that depends on the type of the discriminator.
// According to the CORBA specification, the following types are permissable as
// discriminator types: