org.omg.CORBA.ORB.init().create_union_tc("IDL:Nums:1.0",
"Nums",
org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(9)),
members );
DynUnion dyn_union =
(DynUnion)dynFactory.create_dyn_any_from_type_code( union_tc );
Any discriminator_any = orb.create_any();
discriminator_any.insert_char('l');
DynAny discriminator = dynFactory.create_dyn_any(discriminator_any);
//dyn_enum.set_as_string("salmon");
// DynAny discriminator = dyn_enum;
dyn_union.set_discriminator( discriminator );
dyn_union.member().insert_long(4711);
System.out.println("[Client]: Passing a union..." +
s.generic( dyn_union.to_any()));
// setting a different union value
dyn_union.set_to_default_member();
dyn_union.member().insert_short((short)19);
System.out.println("[Client]: Passing the union again..." +
s.generic( dyn_union.to_any()));
}