[omniORB] Question about the any type

Philip Balister philip at balister.org
Thu Jul 21 13:21:44 BST 2005


This is probably more CORBA specific than omniOrb specific ....

The following code blows core when the any <<= event_data line executes.

 void DomainManager_impl::sendObjAdded_event(char *producerId, char
*sourceId, char *sourceName, CORBA::Object_ptr sourceIOR,
StandardEvent::SourceCategoryType sourceCategory)

{
  StandardEvent::DomainManagementObjectAddedEventType event_datata;
  CORBA::Any any;

  event_data.producerId = CORBA::string_dup(producerId);
  event_data.sourceId = CORBA::string_dup(sourceId);
  event_data.sourceName = CORBA::string_dup(sourceName);
  event_data.sourceIOR = sourceIOR;
  event_data.sourceCategory = sourceCategory;

  any <<= event_data;

The idl is:
00061 struct DomainManagementObjectAddedEventType {
00062 string producerId;
00063 string sourceId;
00064 string sourceName;
00065 SourceCategoryType sourceCategory;
00066 Object sourceIOR;
00067 };

Does any have any ideas, or pointers to good references using the any type with idl structs?

Thanks,

Philip




More information about the omniORB-list mailing list