[omniORB] omniORBpy2.0, sequence<octet>

baileyk@schneider.com baileyk@schneider.com
Tue Jan 28 14:19:11 2003


I believe a sequence<octet> maps directly to a Python string.  The class
created called Principle is just a holder of information about the IDL
type, such as the RepositoryId.  To create a sequence of octet, simply pack
the octets into a regular Python string (possibly using the struct module
or the StringIO module), and pass that.  Since your parameter is inout, you
should get back a 2-tuple with a session and a string as the return value.

Kendall





                                                                                                                           
                    Viacheslav N Tararin                                                                                   
                    <taras@dekasoft.com.ua>            To:     omniorb-list@omniorb-support.com                            
                    Sent by:                           cc:                                                                 
                    omniorb-list-admin@omniorb-s       Fax to:                                                             
                    upport.com                         Subject:     [omniORB] omniORBpy2.0, sequence<octet>                
                                                                                                                           
                                                                                                                           
                    01/28/2003 04:03 AM                                                                                    
                                                                                                                           
                                                                                                                           




Hi, all.
I have next problem.

Exists next IDL definitions

...
typedef sequence<octet> Principal;

interface service {
    session connect(in string username, in string password, inout
Principal p);
};
...

After IDL compiler I have:
...
class Principal:
    _NP_RepositoryId = "IDL:com/dekasoft/fulcrum/sessions/Principal:1.0"
    def __init__(self, *args, **kw):
        raise RuntimeError("Cannot construct objects of this type.")
...

How I can create Principal for pass in to connect method?

Thanks.




_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list