[omniORB] how to pass python list through CORBA IDL?

Martin Trappel 0xCDCDCDCD at gmx.at
Wed Jan 7 07:49:06 GMT 2009


Deepan N Seeralan wrote:
> Hi All,
> 
> I am trying to communicate between a client and server located in 
> different address spaces using the CORBA Naming service. Since I am a 
> newbie to omniORB and CORBA, I tried the example given in the page 
> http://omniorb.sourceforge.net/omnipy2/omniORBpy/omniORBpy002.html . The 
> IDL definition of this example goes like this:
> 
> module Example {
>   interface Echo {
>     string echoString(in string mesg);
>   };
> };
> 
>....
> 
> This example works just fine without any modifications. However, if i 
> try to change the parameters of the method 'echoString' from string to a 
> sequence, I get CORBA_BAD_PARAM error.
> Here is the new IDL and piece of client code where i invoke the method 
> echoString.
> module Example {
>   typedef sequence<string> sample;
>   interface Echo {
>     void echoString(inout sample mesg);
>   };
> };
> .. client code:
> message = ["hello"] #python list
> result  = eo.echoString(message)
> print "I said '%s'. The object said '%s'." % (message,result)
> 

You should also have posted your new server code.

> I referred to the CORBA-Python mapping document which says that list and 
> tuples are the equivalent objects of CORBA sequence. However, when I run 
> the server and client, it throws the error omniORB.CORBA.BAD_PARAM: 
> CORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType, CORBA.COMPLETED_MAYBE).
> 
CORBA.COMPLETED_MAYBE suggests that the *in* part of the call worked, as 
otherwise you would have seen COMPLETED_NO.
What does the server do?

br,
Martin



More information about the omniORB-list mailing list