[omniORB] discarded typecode data in DynAny

Roger Barnett rogerb@harlequin.co.uk
Wed, 18 Oct 2000 15:53:52 +0100




> Sai-Lai Lo writes:
>
> Are you sure? Since omniORB 2.8, the typecode is not expanded when a DynAny
> is created.
>
>> Roger Barnett writes:
>>
>> When an Any is converted to a DynAny the associated
>> typecode is fully expanded and the original discarded.
>>


The code I am having to work round (almost there!) is of the form:

CORBA::DynSequence_ptr
CORBA::ORB::create_dyn_sequence(TypeCode_ptr tc)
{
  if (!CORBA::TypeCode::PR_is_valid(tc))
    throw CORBA::BAD_PARAM(0,CORBA::COMPLETED_NO);

  TypeCode_base* aetc = TypeCode_base::aliasExpand(ToTcBase_Checked(tc));

  if( aetc->kind() != CORBA::tk_sequence ) {
    CORBA::release(aetc);
    throw CORBA::DynAny::TypeMismatch();
  }

  return new DynSequenceImpl(aetc, DYNANY_ROOT);
}

[ this taken from DynAny.cc ]


If the sequence is typedef'd  (the normal case) then this info
is reflected in the parameter tc but is not present in the created
DynSequence.


If this is no longer the case in omniORB 3.x then please let me know.


Thanks


Roger Barnett