[omniORB] omniOrbpy and Gnome Name Service
jon@totient.demon.co.uk
jon@totient.demon.co.uk
Tue, 28 Nov 2000 23:24:32 +0000 (GMT)
Hi
I've been trying to get omniORB to talk to the GNOME Name Service.
I've hacked up this python script
import commands
import string
import sys, urllib
import re
from omniORB import CORBA
import CosNaming
def getGnomeNameServiceIOR():
### hacky way to IOR from root display
### the gnome lib uses X calls.
res = commands.getoutput("xprop -notype -root 32x '=$0' GNOME_NAME_SERVER")
(v,id) = string.split(res, '=')
next_comm = "xprop -notype -id %s 32x '=$0' %s" % (id,v)
res2 = commands.getoutput(next_comm)
(v2,id2) = string.split(res2,"=")
if id2 == id:
res3 = commands.getoutput("xprop -notype -id %s 0s '=$0' GNOME_NAME_SERVER_IOR" % id2)
(v,ior) = string.split(res3,'=')
## strip off the '"' char from the IOR
ior = re.sub('"','',ior)
return ior
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
obj2 = orb.string_to_object(getGnomeNameServiceIOR())
naming = obj2._narrow(CosNaming.NamingContext)
(bl,bi) = naming.list(30)
print "bl is ",b1
print "bi is ",b2
but it hangs on the naming.list operation. This script works if you
point it at omniNames instead. Here is the trace
omniORB: strand Ripper: start.
omniORB: scavenger : start.
omniORB: gateKeeper is tcpwrapGK 1.0 - based on tcp_wrappers_7.6
omniORB: The omniDynamic library is not linked.
omniORB: Python thread state scavenger start.
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: Creating ref to remote: key<0x00000000507bb72efcc625b501000000df4dd6620ef51f61>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:omg.org/CosNaming/NamingContext:1.0
omniORB: strand Rope::incrRefCount: old value = 1
omniORB: Creating Python ref to remote: key<0x00000000507bb72efcc625b501000000df4dd6620ef51f61>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:omg.org/CosNaming/NamingContext:1.0
omniORB: omniRemoteIdentity deleted.
omniORB: strand Rope::decrRefCount: old value = 2
omniORB: ObjRef(IDL:omg.org/CosNaming/NamingContext:1.0) -- deleted.
omniORB: strand Rope::incrRefCount: old value = 1
omniORB: Creating Python ref to remote: key<0x00000000507bb72efcc625b501000000df4dd6620ef51f61>
target id : IDL:omg.org/CosNaming/NamingContext:1.0
most derived id: IDL:omg.org/CosNaming/NamingContext:1.0
ll_send: 120 bytes
4749 4f50 0100 0100 6c00 0000 0000 0000 GIOP....l.......
0100 0000 0100 0000 1800 0000 0000 0000 ................
507b b72e fcc6 25b5 0100 0000 df4d d662 P{....%......M.b
0ef5 1f61 0600 0000 5f69 735f 6100 0000 ...a...._is_a...
0700 0000 6e6f 626f 6479 0000 2800 0000 ....nobody..(...
4944 4c3a 6f6d 672e 6f72 672f 436f 734e IDL:omg.org/CosN
616d 696e 672f 4e61 6d69 6e67 436f 6e74 aming/NamingCont
6578 743a 312e 3000 ext:1.0.
14452omniORB: scavenger : scanning connections
omniORB: scavenger : scanning connections
...... just hangs printing "scanning connections" ad infinitum.
Looks to me that GNOME NAME server is not responding to the is_a
call?
Is this an Orbit bug?
Any ideas?
Jon