AW: [omniORB] activate_object_with_id Returns None
Fischer, Clemens
clemens.fischer at atlas-elektronik.com
Thu Apr 24 11:50:38 BST 2008
Hi, here's a small example:
----------------------------------------
IDL in Test.idl:
module Test
{
interface Intf
{
void print_text(in string text);
};
};
----------------------------------------
Server code in TestServer.py:
from omniORB import CORBA
import Test
import Test__POA
import sys
class TestIntfImpl(Test__POA.Intf):
def print_text(self, text):
print text
orb = CORBA.ORB_init(sys.argv)
poa = orb.resolve_initial_references("omniINSPOA")
poa._get_the_POAManager().activate()
servant = TestIntfImpl()
poa.activate_object_with_id("TestIntf", servant)
try:
orb.run()
except:
pass
poa.deactivate_object("TestIntf")
----------------------------------------
Client code in TestClient.py:
from omniORB import CORBA
import Test
import sys
orb = CORBA.ORB_init(sys.argv)
obj = orb.string_to_object(sys.argv[1])._narrow(Test.Intf)
obj.print_text(sys.argv[2])
----------------------------------------
Run the server by 'python TestServer.py -ORBendPoint :::12345' (or any other valid endpoint). Then run the client by
'python TestClient.py corbaloc:iiop:localhost:12345/TestIntf Hello' and see what happens.
Cheers
Clemens
-----Ursprüngliche Nachricht-----
Von: omniorb-list-bounces at omniorb-support.com [mailto:omniorb-list-bounces at omniorb-support.com] Im Auftrag von Marco Ferreira
Gesendet: Mittwoch, 23. April 2008 18:38
An: omniorb-list at omniorb-support.com
Betreff: [omniORB] activate_object_with_id Returns None
Hey all.
I'm trying to have my corba server objects to be accessible with
something like:
corbaloc::host/object
After reading and googling (allot) I can't make this work. The problem
is, when I try to activate_object_with_id, this function doesn't return
me any usable value, just None (using python)
Any help would be greatly appreciated. Thanks
_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
More information about the omniORB-list
mailing list