org.jacorb.orb.dynany.DynEnum dynenum1 = (org.jacorb.orb.dynany.DynEnum) factory
.create_dyn_any_from_type_code(MyEnumHelper.type());
dynenum1.set_as_ulong(MyEnum._A);
DynUnion dynany2 = (DynUnion) factory.create_dyn_any_from_type_code(EnumUnionHelper.type());
dynany2.set_discriminator(dynenum1);
assertTrue (dynany2.to_any () != null);
org.omg.CORBA.Any aa = dynany2.to_any ();
EnumUnion eu = EnumUnionHelper.extract (aa);
server.e (eu);
server.g (eu, new EnumUnionHolder (eu));
org.omg.CORBA.Request r = server._request("g");
r.set_return_type(setup.getClientOrb ().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
EnumUnionHelper.insert (r.add_in_arg() , eu);
r.add_in_arg().insert_any(dynany2.to_any());
org.omg.CORBA.Any out_arg = r.add_out_arg();
out_arg.type(EnumUnionHelper.type());
r.invoke();