[omniORB] octet sequence

sandor.kopanyi@essnet.se sandor.kopanyi@essnet.se
Tue May 28 14:51:03 2002


> > When trying to send in an octet sequence as a parameter
> > to a function or as a return value (or part of a struct,
> > of course), I always get CORBA.BAD_PARAM exception. E.g.
> > typedef sequence<octet> Something;
> > Are you trying to send a Python list?  The Python mapping for
> sequence<octet> is a string, since strings are much more efficient
> than lists in Python, and they are more handy for binary data.


Ops, using string works. Thanks! 

Just for the other "sloppy" readers (like me :) of the Python mapping
spec. (01-02-66): in chapter 1.3.2 (Mapping for Template and Array Types)
says:

"Both the bounded and the unbounded string type of IDL are mapped to the
Python string type. [...]"

A few lines below says:

"Sequences and arrays of octets and characters are mapped to the string
type for efficiency reasons."

Sorry not reading this careful enough.

Just one more question: how do I send in an octet "matrix" (i.e. a sequence
of sequence)? As a list of strings?

Best regards,
Sandor