e.printStackTrace();
Assert.fail(e.getMessage());
}
Object nameService = orb.resolve_initial_references("NameService");
NamingContext namingContext = NamingContextHelper.narrow(nameService);
PrimitivesSetterServant singleSetter = new PrimitivesSetterServant();
ArraysSetterServant arraysSetter = new ArraysSetterServant();
TestObjectServant complexObject = new TestObjectServant();
CalcServant calcObject = new CalcServant();
ObjectManagerServant objectManager = new ObjectManagerServant();
EnumManagerServant enumManager = new EnumManagerServant();
ArraysUnionsServant arraysUnions = new ArraysUnionsServant();
orb.connect(singleSetter);
orb.connect(arraysSetter);
NameComponent nc;
NameComponent[] path;
nc = new NameComponent("PrimitivesSetter", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, singleSetter);
nc = new NameComponent("ArraysSetter", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, arraysSetter);
nc = new NameComponent("TestObject", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, complexObject);
nc = new NameComponent("CalcObject", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, calcObject);
nc = new NameComponent("ObjectManager", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, objectManager);
nc = new NameComponent("EnumManager", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, enumManager);
nc = new NameComponent("ArraysUnions", "");
path = new NameComponent[] {nc};
namingContext.rebind(path, arraysUnions);
NamingContextExt nce = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
refArraysSetter = nce.resolve(nce.to_name("ArraysSetter"));
refPrimitivesSetter = nce.resolve(nce.to_name("PrimitivesSetter"));