[omniORB] create_union_tc with discriminator type long

Clemens Fischer fischer.c@stn-atlas.de
Mon Sep 2 12:39:01 2002


Hi all,

i've got a problem with omniORB4 beta2 under NT.
The following code throws BAD_PARAM from create_union_tc():

  CORBA::UnionMemberSeq member_seq;
  member_seq.length(2);
      
  member_seq[0].name = CORBA::string_dup("lng");
  member_seq[0].type = CORBA::TypeCode::_duplicate(CORBA::_tc_long);
  member_seq[0].label <<= CORBA::Long(0);
  member_seq[1].name = CORBA::string_dup("str");
  member_seq[1].type = CORBA::TypeCode::_duplicate(CORBA::_tc_string);
  member_seq[1].label <<= CORBA::Long(1);

  CORBA::TypeCode_var tc = orb->create_union_tc("IDL:TestUnion:1.0",
                                                "TestUnion",
                                                CORBA::_tc_long,
                                                member_seq);

If i change the discriminator type to unsigned long,
everything is ok.

Regards
Clemens