[omniORB] Insert union without default case into Any

Ioulia Passynkova ioulia.passynkova@nettest.com
Mon, 29 Oct 2001 15:15:05 -0500


Hi!

I have problem with inserting union without default case into CORBA Any.


Here is part on IDL file:

#pragma prefix "nci"

namespace PEC_TrSig_V1 {

     interface Aal2Setup {
        union Test switch(boolean) {
        case TRUE:
            short a;
        };
       =20
        void ping(in any r);=20
        void ping1(in Test t);

   }; // Aal2Setup
};

I use omniORBpy:

// get object reference of Aal2Setup
EN_AAL2_1_Manager =3D .....

// Create Test union.
test =3D PEC_TrSig_V1.Aal2Setup.Test(CORBA.FALSE, None)
config =3D
CORBA.Any(CORBA.TypeCode(CORBA.id(PEC_TrSig_V1.Aal2Setup.Test)), test)

// Works ok
EN_AAL2_1_Manager.ping1(test)

// Here is the problem
EN_AAL2_1_Manager.ping(config) =20
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "PYSTUB/PEC_TrSig_Aal2_V1_idl.py", line 683, in ping
    return _omnipy.invoke(self, "ping",
_0_PEC_TrSig_V1.Aal2Setup._d_ping, args)
omniORB.CORBA.MARSHAL: Minor: 1413545984, Completed: COMPLETED_NO.

If I create Test union with TRUE discriminator:

test =3D PEC_TrSig_V1.Aal2Setup.Test(CORBA.TRUE, 1)
config =3D
CORBA.Any(CORBA.TypeCode(CORBA.id(PEC_TrSig_V1.Aal2Setup.Test)), test)
// The same call works.=20
EN_AAL2_1_Manager.ping(config) =20

Ioulia Passynkova | Developer Engineer, Software
email ioulia.passynkova@nettest.com | dir 905 948 7595=20
NetTest Canada | 55 Renfrew Drive, Markham, ON L3R 8H3 | Canada
web www.nettest.com | tel 905 479 8090 | fax 905 475 6524