Discussion:
[omniORB] Java to C++ hell
Janusz Dalecki
2008-02-28 15:29:07 UTC
Permalink
Hi,

For the reasons that is very hard to explain in short description I need
to un-marshal and marshal "Any" object coming from the stream data
Socket(from Java app) as a basically array of bytes. Is there any
utility in OMNIOrb that would help me to translate the stream of bytes
sent from Java world to C++ any object?

Any help very much appreciated.!!!

Regards,

Janusz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080228/f6cb11c8/attachment.htm
Duncan Grisby
2008-03-01 22:00:13 UTC
Permalink
Post by Janusz Dalecki
For the reasons that is very hard to explain in short description I need
to un-marshal and marshal "Any" object coming from the stream data
Socket(from Java app) as a basically array of bytes. Is there any
utility in OMNIOrb that would help me to translate the stream of bytes
sent from Java world to C++ any object?
Any help very much appreciated.!!!
The way that's endorsed by the CORBA standard is with the Codec
interfaces, but omniORB doesn't support that.

Instead, you can use the omniORB cdrStream classes. Look in
include/omniORB4/cdrStream.h at cdrMemoryStream and
cdrEncapsulationStream. You probably want to use cdrEncapsulationStream
to handle a CDR encapsulation that includes byte order information.

Hopefully it's obvious how to use them. Search through the code for
places they're used to see some examples.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...