[omniORB] Problems with Sequences and Anys

Marcus Portmann marcus@dydx.com
Mon, 17 May 1999 23:00:57 +0200 (SAST)


Hi,

I am currently in the process of porting a fairly large CORBA based
application from OOC's orbacus to omniorb.
Unfortunately IDL the following IDL code is causing me
quite a problem. Im not sure whether it is orbacus's non standard
implementation that let this work before or whether omniorb does not
support this functionality

------------------------------------------------------------------>

struct Command
{
   string id;          
   long version;     
   string description;   
   unsigned long scheduledTime; 
   long currentTask;    
   any   dataSeq;               
   any   taskSeq;           
   any   eventSeq;             
};

struct CommandData     
{
   string key;      
   any value;                  
};

struct CommandTask
{
   unsigned long id;        
   string dn;                 
   string clientDn;        
   string targetDn;    
   string description;         
   long timeout;               
   long reschedulePolicy;       
   string action;      
   long retries;          
   long maxRetries;       
   long status;            
};



struct CommandEvent
{
   long id;                // Event ID
   long timestamp;              // Time Stamp
   long type;                   // Event Type, defined in CommandHelper.h
   string description;          // Event description 
   unsigned long taskId;        // The task resulting in the generation of
this event
};


typedef sequence <CommandData> CommandDataSeq;
typedef sequence <CommandTask> CommandTaskSeq;
typedef sequence <CommandEvent> CommandEventSeq;

------------------------------------------------------------------------------------->

when using the code:

   Command cs;
   CommandDataSeq  dataSeq;                                                                    


   cs.dataSeq  <<= dataSeq;                 


When trying to compile this i get the following error message:

CommandHelper.cpp:63: no match for `::CORBA::Any & <<= CommandDataSeq &'

Is it possible to insert sequences of user defined types into an Any with
omni orb?


Thank you for your time.

-- marcus


Marcus Portmann