[omniORB] help me get started
vaibhav jha
vaibhav1jha@rediffmail.com
Mon Jun 10 07:31:00 2002
I am using omniorbpy 1.4,winnt server 4.0 and activestate python
2.1.1.
i am trying to get the example_echo.idl example in the
tutorial.The contents of example_echo is:
module messenger
{
interface Echo {
string echoString(in string mesg);
};
};
When i run the following :
D:\>omniidl.exe -Yomnicpp.exe -bpython -v example_echo.idl
i get the following verbose response:
omniidl: Importing back-end `python'
omniidl: `python' imported from
`d:\omni\lib\python\omniidl_be\python.pyc'
omniidl: Preprocessing `example_echo.idl' with `omnicpp.exe
-D__OMNIIDL_PYTHON__
example_echo.idl'
omniidl: Running front end
omniidl: Running back-end `python'
Example and Example_poa 2 new directories have been created.
These
directories only contain
_init__.py files and nothing else.They do not have an echo
attribute.Therefore when i tried to run the following code (as
given in the tutorials):
import sys
sys.path.append("c:\\")
from omniORB import CORBA, PortableServer
import Example, Example__POA
class Echo_i (Example__POA.Echo):
def echoString(self, mesg):
print "echoString() called with message:", mesg
return mesg
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
ei = Echo_i()
eo = ei._this()
poaManager = poa._get_the_POAManager()
poaManager.activate()
message = "Hello"
result = eo.echoString(message)
print "I said '%s'. The object said '%s'." % (message,result)
I got the following error:
D:\omni\bin\x86_win32>python.exe corbatry.py
Traceback (most recent call last):
File "corbatry.py", line 6, in ?
class Echo_i (Example__POA.Echo):
AttributeError: 'Example__POA' module has no attribute 'Echo'
Please Help me trace the problem -i.e why the example_poa
doesnot
have an echo attribute as is said in the tutorials.
Regards
Vaibhav Jha.
_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or
Abroad
http://monsterindia.rediff.com/jobs