import org.omg.CosNaming.*; import org.omg.CORBA.*; public class test2client { public static void main(String[] args) { try { ORB orb = ORB.init(args,null); org.omg.CORBA.Object nsobjref = orb.resolve_initial_references("NameService"); NamingContext ncref = NamingContextHelper.narrow(nsobjref); NameComponent[] path = { new NameComponent("test2server","Object") }; // obtain CORBA.Object ref using naming service lookup // then narrow to local bigobject bigobject remobj = bigobjectHelper.narrow(ncref.resolve(path)); // finally! make remote calls: int x = 4; System.out.println(remobj.f(x)); String a = "abcd"; StringHolder sh = new StringHolder(a); String s = remobj.g( sh ); System.out.println(sh.value); System.out.println(s); } catch (Exception ee) {ee.printStackTrace();} } // main }