import java.lang.*; import java.net.*; import java.io.*; public class prova { public static void main(String[] args) { try { System.out.println("Trying to get sbh from bindingurl..."); String bUrlStr = "http://amberjack.stanford.edu:8010/cgi-bin/cosnaming/cosnaming.py?method=Resolve&pName=Search/Altavista&pContext=dl/Users/testiiop/Services/"; System.out.println(bUrlStr); URL bUrl = new URL(bUrlStr); DataInputStream bUrlIn= new DataInputStream(bUrl.openStream()); String sbh = bUrlIn.readLine(); System.out.println("sbh= "+sbh); String type = bUrlIn.readLine(); System.out.println("type= "+type); String typeid = bUrlIn.readLine(); System.out.println("typeid= "+typeid); bUrlIn.close(); org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); org.omg.CORBA.Object obj = orb.string_to_object(sbh); System.out.println("Objecte " + obj); //ITCN.TaskFactory ttt = ITCN.TaskFactoryHelper.narrow(obj); IDLInterchange.CConstrainCollection ttt = IDLInterchange.CConstrainCollectionHelper.narrow(obj); if (ttt == null) { System.out.println("null"); } else { System.out.println("no null"); } System.out.println("taskfactory " + ttt); } catch (Exception e) { System.out.println(e); } } }