gabriele renzi
2007-04-13 02:46:22 UTC
Hi everyone,
I just started experimenting with omniORBpy today,
everything seemed to be working fine but now I hit a
strange problem. My IDL file looks like this
module PSD {
interface Calc {
string myop(in string name,in string other);
};
interface CalcFactory {
Calc client_instance(in string cname);
};
};
omniidl seems to compile the idl fine, and I can get
the CalcFactory correctly via
obj= orb.string_to_object(ior)
cf = obj.narrow(PSD.CalcFactory)
but then if I try to call
calc = cf.client_instance('name')
I get a
CORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType,
CORBA.COMPLETED_MAYBE) exception.
The code in CalcFactoryImpl, the subclass of the
abstract PSD__POA.CalcFactory is like this:
def client_instance(self,key):
client=CalcImpl() # PSD__POA.Calc subclass
return client
Someone has a clue on what I may be doing wrong? Sorry
if I'm posing a dummy question.
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
I just started experimenting with omniORBpy today,
everything seemed to be working fine but now I hit a
strange problem. My IDL file looks like this
module PSD {
interface Calc {
string myop(in string name,in string other);
};
interface CalcFactory {
Calc client_instance(in string cname);
};
};
omniidl seems to compile the idl fine, and I can get
the CalcFactory correctly via
obj= orb.string_to_object(ior)
cf = obj.narrow(PSD.CalcFactory)
but then if I try to call
calc = cf.client_instance('name')
I get a
CORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType,
CORBA.COMPLETED_MAYBE) exception.
The code in CalcFactoryImpl, the subclass of the
abstract PSD__POA.CalcFactory is like this:
def client_instance(self,key):
client=CalcImpl() # PSD__POA.Calc subclass
return client
Someone has a clue on what I may be doing wrong? Sorry
if I'm posing a dummy question.
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html