[omniORB] Marshal exception
Luke Deller
ldeller@xplantechnology.com
Mon Jun 17 09:34:01 2002
vaibhav jha wrote:
> I am using omniorbpy,activestate python 2.1.1 on windows nt 4.0
> workstation.I am trying to pass a dictionary as a parameter of hte
> function called by client through the corba server.
CORBA is stricter about the types of function parameters than Python.
In your idl definition you have:
> typedef sequence<long> Seq;
> interface Echo {
> echoString(in Seq mesg);
> };
The above is not correct IDL because echoString needs a function result..
I suppose you meant:
void echoString(in Seq mesg);
Anyway, your IDL says that echoString must only be called with a parameter
which is of type "Seq" which is an alias for "sequence<long>".
In Python, the CORBA IDL type "sequence<long>" corresponds to a list of
integers. So you must call this function with a list of integers. If you
pass any other type (a dictionary for example) then you will get a
CORBA.Marshal exception, as you have discovered :-)
Luke.