[omniORB] omniORB.CORBA.BAD_PARAM when receiving long.

Stephen White swhite@fnal.gov
Fri Nov 8 15:01:10 2002


No one answered my question. Possibly because my reply to my own message made it confusing.  I've listed it again below.  Any help would be appreciated.

Using omniORBpy on Linux, I have a server which returns a single field 
defined in IDL as "long".  Picking a value out of the air, if the server 
returns 131 the client is fine, but if the server returns  131L   the 
client receives  omniORB.CORBA.BAD_PARAM.  Shouldn't omniORB recognize 
the Python long as an appropriate IDL long?  Or am I not understanding 
something?  A simple code example is below:

In the IDL file I simply have:
   long getLong();

The client
    .......
    x = servant.getLong()
    print x

The Server

     def getLong(self):
       x = 131
       return x  
       # this works fine

      def getLong(self):
         x = 131L   # or x = long(131)
         return x
         # client will fail with omniORB.CORBA.BAD_PARAM

Thank you

Stephen P. White