Java Insertion into org.omg.CORBA.Any

The following sections give examples of any insertion for a representative sample of CORBA data types. The IDL types used in these examples are taken from Listing 8.1.

Inserting Basic Types

The code in Listing 8.30 shows how basic types are inserted into an any.

Listing 8.30. Java Examples of Inserting Basic Types
// Java //-------------------------------------------------------------------- // Declaration of ' org.omg.CORBA.Any ' // (assume that 'orb', an instance of 'org.omg.CORBA.ORB', is initialized) org.omg.CORBA.Any theAny = org.omg.CORBA.ORB.init().create_any(); //-------------------------------------------------------------------- // Inserting Basic Types // // Inserting a 'short' short s = -123; ...

Get Pure CORBA now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.