473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ORBit-Python problem :(

I wrote a small CORBA program and am using ORBit-python.
The IDL file was as below:
---------------------------
module MESSAGING
{
typedef sequence<string> msgLines;
struct msg
{
string fr;
string to;
msgLines body;
};
interface mail
{
void submit (in msg message);
};
};
---------------------------------

The server program is as below:
---------------------------------
#!/usr/bin/python
import CORBA
class mail:
msg = 0
def submit(self, msg):
print "Message Recieved from:", msg.fr
print "Message for:", msg.to
for line in msg.body:
print line
self.msgs = self.msgs + 1;
print "Message Served: ", self.msgs

CORBA.load_idl("msg.idl")
CORBA.load_idl("/usr/share/idl/name-service.idl")

orb = CORBA.ORB_init((), CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")

servant = POA.MESSAGING.mail(mail())
poa.activate_object(servant)
ref = poa.servant_to_reference(servant)
open("./msg-server.ior","w").write(orb.object_to_string(ref))
print "Wrote IOR to file", orb.object_to_string(ref)
poa.the_POAManager.activate()
orb.run()
---------------------------------

After running the program, it gives the following errors:
---------------------------------
Traceback (innermost last):
File "./msg-server.py", line 14, in ?
CORBA.load_idl("msg.idl")
AttributeError: load_idl
---------------------------------

If I change the CORBA.load_idl to CORBA._load_idl then the error comes
at some other place... Namely below:

---------------------------------
Traceback (innermost last):
File "./msg-server.py", line 20, in ?
servant = POA.MESSAGING.mail(mail())
NameError: POA
---------------------------------

The CORBA module is dynamically loaded from the following file:
/usr/lib/python1.5/site-packages/CORBAmodule.so

I have installed orbit-python-0.3.0-1 on my machine.

Please help me out.. I need help desperately to run the server :((
Thanx in advance :)
Jul 18 '05 #1
0 1165

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul | last post by:
How would I convert the contents of a textbox into text files. Say I have a textbox containin the following... 13-02-00 - Paul Oakenfold 06-02-00 - William Orbit 30-01-00 - Laurent Garnier...
16
by: WaterBug | last post by:
When clicking on the following link from an email i.e - http://myserver/myapplication/myprogram.asp?urlvar1=some%20stuff&urlvar2=more%20stuff I get a server 500 error. With that same browser...
2
by: Eurydice | last post by:
I would like to put a javascript code to obtain on my meteo page http://perso.wanadoo.fr/jmrw/Meteo/Meteo.shtml the time of the raise and the sunset of the sun according to the date. I have...
19
by: Stephan Aspridis | last post by:
Hi folks, a happy new year. I have a little problem with a program I am writing at the moment. A loop doesn't behave the way I'd like to (namely, the "break" is ignored). This is the code in...
12
isotope11
by: isotope11 | last post by:
Would someone have code that emulates projectile motion. This is what I've got: Shape1 - the projectile The variables are: Velocity - the muzzle velocity Angle - the angle in which the...
6
by: Samuel | last post by:
Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl...
3
by: roxrox_1959 | last post by:
I'm attempting to connect to a DB2 database using DBD::DB2 running on a Linux device. I'm getting the following error: ** connect: Unable to get database handle: DBI...
2
by: Kira Yamato | last post by:
I'm wondering if it is possible to define the following kind of scheme: Suppose X is a scheme and G is a subgroup of the endomorphism group of X. Define for each x in X the orbit of x under G ...
10
by: HardySpicer | last post by:
I have a cvs data file orbit.csv and found this code. function ReadFile() { var fso, f1, ts, s; var ForReading = 1; fso = new ActiveXObject("Scripting.FileSystemObject"); f =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.