[omniORB] See this before any other message frm me.

vaibhav jha vaibhav1jha@rediffmail.com
Sat Jun 8 09:19:00 2002


I am using omniorbpy 1.4,winnt server 4.0 and activestate python
2.1.1.

My earlier attempts to compile .idl files with omniidl returned
the following error:

Omniidl:Error running preprocessor.

To counteract my previous problem i compiled example_echo.idl
as:

C:\>omniidl.exe -Yd:\omni\bin\x86_win32\omnicpp.exe -bpython
d:\omni\bin\x86_win
32\example_echo.idl

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.

Regards
Vaibhav Jha.

_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs