import org.omg.CosNaming.*; import org.omg.CORBA.*; import kirje.*; public class kirjeKlient{ public static void main(String argumendid[]) throws Exception{ ORB orb=ORB.init(argumendid, null); inimandmedImpl impl=new inimandmedImpl(); orb.connect(impl); NamingContext namingContext=NamingContextHelper.narrow( orb.resolve_initial_references("NameService") ); NameComponent[] path={new NameComponent("kirje", "Object")}; inimandmed ia=inimandmedHelper.narrow( namingContext.resolve(path) ); Inimene in=new Inimene(); in.eesnimi="Mati"; in.perenimi="Karu"; System.out.println(ia.nimepikkus(in)); } }