Thomas Lockhart
2006-09-27 08:05:43 UTC
I'm using omniORB-4.0.7 and omniORBpy-2.7. I am seeing what may be an
inconsistency in handling CORBA anys, or at least in my understanding of
how to use them. In constructing a CORBA any, I notice the following
Where for the first case returning the any to a co-located python client
succeeds but the latter case fails with the following:
omniORB: throw BAD_PARAM from pyMarshal.cc:3834
(MAYBE,BAD_PARAM_WrongPythonType)
afaict the latter case should be legal and is suggested in the version
1.2 Python mapping spec from OMG.
fwiw there is a different behavior from omniORBpy-2.6, details are shown
below (I haven't tested the actual results of returning an any for 2.6
in this simple test case, but have used CORBA.Any() to pass results of
sequences of longs etc to other applications in the past). Anyway, hints
and suggestions would be appreciated. Thanks!
- Tom
inconsistency in handling CORBA anys, or at least in my understanding of
how to use them. In constructing a CORBA any, I notice the following
x = any.to_any(3)
print x.typecode()
CORBA.TC_longprint x.typecode()
y = CORBA.Any(CORBA.TC_long, 3)
print y.typecode()
<CORBA.TypeCode 'IDL:omg.org/CORBA/long:1.0'>print y.typecode()
Where for the first case returning the any to a co-located python client
succeeds but the latter case fails with the following:
omniORB: throw BAD_PARAM from pyMarshal.cc:3834
(MAYBE,BAD_PARAM_WrongPythonType)
afaict the latter case should be legal and is suggested in the version
1.2 Python mapping spec from OMG.
fwiw there is a different behavior from omniORBpy-2.6, details are shown
below (I haven't tested the actual results of returning an any for 2.6
in this simple test case, but have used CORBA.Any() to pass results of
sequences of longs etc to other applications in the past). Anyway, hints
and suggestions would be appreciated. Thanks!
- Tom
x = omniORB.any.to_any(3)
print x.typecode()
<omniORB.tcInternal.TypeCode_empty instance at 0xb7a751cc>print x.typecode()
x = omniORB.any.to_any(int(3))
print x.typecode()
<omniORB.tcInternal.TypeCode_empty instance at 0xb7a751cc>print x.typecode()
x = CORBA.Any(CORBA.TC_long, 3)
print x.typecode()
<omniORB.tcInternal.TypeCode_empty instance at 0xb7a751cc>print x.typecode()