[Orbit-python-list] Do activate_object_with_id and -ORBIPv4Port really work?
Status: Inactive
Brought to you by:
tack
|
From: <ml...@kn...> - 2002-01-29 18:25:06
|
Hi,
I want to have a CORBA client that does not need to know the
IOR of the server, but without the overhead of a CORBA
naming service. If the server has a single factory object
with a fixed ID the server uses a fixed client-known TCP
port, the client should reach the service using sth. like:
$ ./client corbaloc::192.168.10.20:7777/Echo
Unfortunately my orbit-python based server doesn't do what I
hoped for:
#!/usr/bin/env python
import random, CORBA
from _GlobalIDL__POA import Echo
import sys
class Echo_Impl(Echo):
def echoString(self, astring):
outnum = random.randint(0, 100) / 100.0
print "[server] %s -> %f" % (astring, outnum)
return self._this(), outnum
sys.argv.append("-ORBIIOPIPv4=1")
sys.argv.append("-ORBIIOPUSock=0")
sys.argv.append("-ORBIPv4Port=7777")
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
servant = Echo_Impl()
poa = orb.resolve_initial_references("RootPOA")
poa.activate_object_with_id("Echo", servant)
print orb.object_to_string(servant._this())
poa.the_POAManager.activate()
orb.run()
If I look at the ior string (using catior, ior-decode, or
ior-decode-2), the TCP port is e.g. 1188, not 7777, and the
object key is no "Echo", but I don't know what. I believe
that I misunderstood at least two CORBA or orbit-python
concepts, right? Could someone enlighten me, please?
Thanks in advance!
|