Re: [Orbit-python-list] are you alive? and the "orbit-python" project?
Status: Inactive
Brought to you by:
tack
From: Eugene P. S. <eu...@en...> - 2002-05-28 07:40:37
|
Eugene P. Sizikov wrote: > Hello, Tack! > > I have a question about using CORBA NamingService with orbit-python > (using o-p from gnome cvs). When I do 'import CosNaming' where the > CosNaming module imported from? And why it's only NamingService and > not InteroperableNamingService as in ORBit2 (no NamingContextExt > interface implementation)? > > Also, any NamingContext function calls is CORBA.COMM_FAILURE (and the > orbit-name-service-2 process is aborted after the function aborted). > > Here is my test code: > > #!/usr/bin/python2.2 > # server.py > > import sys > > try: > import CORBA, CosNaming > except: > print "Can't import CORBA stuff, exiting" > sys.exit(-1) > > orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) > root_poa = orb.resolve_initial_references("RootPOA") > deas_poa = root_poa > > ns_ior_filename = "./ins.ior" > > # for registering servants with the CORBA NamingService > # FIXME: where can I get the ior from? > root_ns_nc = > orb.string_to_object(open(ns_ior_filename).readline())._narrow(CosNaming.NamingContext) > > name = [CosNaming.NameComponent()] > > # register DEAS naming context with the CORBA NamingService > name[0].kind = 'DEAS context' > name[0].id = 'root' > try: > deas_ns_nc = root_ns_nc.new_context()._narrow(CosNaming.NamingContext) > except: > print 'Can not create NameService CosNaming.NamingContext instance' > sys.exit(-3) > > # !!! Always aborted here !!! > root_ns_nc.rebind_context(name, deas_ns_nc) > > # activate the POAManager > poa_manager = deas_poa.the_POAManager() > poa_manager.activate() > > # run the ORB > orb.run() > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Orbit-python-list mailing list > Orb...@li... > https://lists.sourceforge.net/lists/listinfo/orbit-python-list Hello! I have found out when it (o-p) gets CosNaming from! /usr/share/name-service.idl from gnome-? rpm. But how am I to work with it ?! Implementation of this .idl is the orbit-name-server-2 with is running and which IOR I'm using! What do I need on the client (o-p) side? Eugene. |