[omniORB] Re: Client recieves omniORB.CORBA.BAD_PARAM when receiving long.

Stephen White swhite@fnal.gov
Wed Nov 6 19:23:37 2002


The example should show:
   long getLong();

   not
   void getLong();

sorry

Stephen White wrote:

> 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:
>   void getLong();
>
> The client
>    .......
>    x = servant.getLong()
>    print x
>
> The Server
>
>     def getLong(self):
>       x = 131
>       return x        # this works fine
>
>      def getLong(self):
>         x = long(131)    #or  x = 131L
>         return x
>         # client will fail with omniORB.CORBA.BAD_PARAM
>
> Thank you
>
> Stephen P. White
>
>
>