[omniORB] Extracting object reference from any directly

Α€ΕΓΌφ ts-eliot@hanmail.net
Fri, 23 Jun 2000 20:31:54 KST


Hi,all

CORBA::Any aAny = msg->getData();
SECSList_ptr list;
aAny >>= list;

When I used >>= operator to extract object reference
from any, I've encountered the following error.
Of course, I compiled IDL file with -a flag.
(Visual C++, omniORB2.80)

client.obj :
 error LNK2001:
 unresolved external symbol   <--
 "bool __cdecl operator>>=(class CORBA::Any const &,class driver::SECSList *
&)" (??_2@YA_NABVAny@CORBA@@AAPAVSECSList@driver@@@Z)

Debug/client.exe : fatal error LNK1120: 1 unresolved externals

But, there is no problem
when I modified the code like this.

CORBA::Any aAny = msg->getData();
CORBA::Object_ptr obj;
SECSList_ptr list;
aAny >>= CORBA::Any::to_object(obj);
list = SECSList::_narrow(obj);

So, whenever I want to get a object reference from any
must I get a generic reference first and cast it?
Are there any methods to get object reference directly?

Please advise...

Taek-su,
Sejong Telecom Inc.
Seoul,
Korea.
==================================================
No. 1 ?l8. @NEM3], Daum
Fr;} >24B 9+7a E-mail AV<R GQ8^@O3]
Av18CL GQ1[ 0K;v<-:q=: Daum FIREBALL
http://www.daum.net