[omniORB] Extracting object ref. from TypeAny

humbein@gmx.de humbein@gmx.de
Tue, 29 Jan 2002 13:22:27 +0100 (MET)


This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.

Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.

--========GMXBoundary130951012306947
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

> You need to make sure you compile your IDL giving the -Wba flag to
> omniidl, and then link with the DynSK.o file as well as the SK.o file.

Thanks a lot. That helped to compile it :)

The problem is that I cannot get the object data from the consumer side. I
found 
something in Henning/Vinoski's book about "extraction of object references"
in chptr. 
15.3.8 of the 5th edition.

Hence I tried something like:
EventData_ptr event; //ok
data >>= event;	//ok
cout << (*event).id() << "|" << (*event).value() << endl; //error

The runtime error that comes up is "omniORB: ERROR -- the application
attempted to 
invoke an operation on a nil reference."

I do not have to check if it is the right type of event due to this shall be
the only 
one ever be provided.

What's wrong with that? On the supplier side I am providing a reference to a
new 
object with the data inside.

I am not absolutely dependent on a real object type. Is it easier to
implement 
everything with a struct?

Thanks a lot in advance,
Peter.

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
--========GMXBoundary130951012306947
Content-Type: application/octet-stream; name=""
Content-Transfer-Encoding: base64


--========GMXBoundary130951012306947
Content-Type: application/octet-stream; name="
"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="
"

--========GMXBoundary130951012306947--