Antonio Beamud Montero
2009-03-26 22:11:21 UTC
Hi all:
I've defined a struct, and a method that returns this struct type. The
problem is when I try to return a null value instead this struct. For
example:
idl:
...
struct SInfo {
wstring id;
wstring address;
wstring tlf;
}
SInfo get_personal_info(in wstring name);
in python:
..
def get_personal_info(self, name):
if name in self.personal_dict:
return SInfo(self.personal_dict[name]['id'],
self.personal_dict[name]['address'],
self.personal_dict[name]['tlf'])
else:
return None
If the name exists, all works well, but if not exists, the next error
appears:
omniORB.CORBA.BAD_PARAM:
ORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType, CORBA.COMPLETED_MAYBE)
I've tried with None, Corba.types.NoneType and CORBA.Object._nil
, but the same error.
Thanks.
I've defined a struct, and a method that returns this struct type. The
problem is when I try to return a null value instead this struct. For
example:
idl:
...
struct SInfo {
wstring id;
wstring address;
wstring tlf;
}
SInfo get_personal_info(in wstring name);
in python:
..
def get_personal_info(self, name):
if name in self.personal_dict:
return SInfo(self.personal_dict[name]['id'],
self.personal_dict[name]['address'],
self.personal_dict[name]['tlf'])
else:
return None
If the name exists, all works well, but if not exists, the next error
appears:
omniORB.CORBA.BAD_PARAM:
ORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType, CORBA.COMPLETED_MAYBE)
I've tried with None, Corba.types.NoneType and CORBA.Object._nil
, but the same error.
Thanks.