dynFactory = org.omg.DynamicAny.DynAnyFactoryHelper.narrow(obj);
}
public void testInsertAnyObject() throws Exception
{
DynArray dyn_array = null;
org.omg.CORBA.Object obj = orb.string_to_object (nameService);
TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();
TypeCode array_tc =
orb.create_array_tc (3, tc);
dyn_array =
(DynArray) dynFactory.create_dyn_any_from_type_code (array_tc);
Any [] object_array = new Any[3];
object_array[0] = orb.create_any();
object_array[1] = orb.create_any();
object_array[2] = orb.create_any();
object_array[0].insert_Object (obj);
object_array[1].insert_Object (obj);
object_array[2].insert_Object (obj);
dyn_array.set_elements (object_array);
dyn_array.to_any();
dyn_array.destroy();
}