[Ace-users] Re: Notification Service Issue: Marshalling exception for nested struct in 5.5.10, but not for 5.5.9

Rob Ratcliff rrr6399 at futuretek.com
Fri Aug 10 13:23:21 CDT 2007


Hi Johnny,

Thanks for the quick reply!

I'm sending the RecordSequence defined with a generic version of the
IDL below:

	typedef string NameType;

	typedef string IdType;

	typedef string TimestampStringType;

	typedef long long TimestampType;

	struct HeaderData {
		TimestampType timestamp;
		TimestampStringType timestampString;
		IdType id;
		NameType name;
	};


	struct Point {
		double x;
		double y;
	};

	typedef sequence<Point> Polyline;

	typedef sequence<Polyline> Polylines;

	enum DataType {A, B, C};

	struct Data {
		DataType type;
		double value;
		double value2;
		double value3;
		Polylines lines;
		Polylines lines2;
	};

	struct Record {
		HeaderData header;
		Data myData;
	};

	typedef sequence<Record> RecordSequence;

The Notification message has a few parameters using this Java code:

		StructuredEvent dataEvent = new StructuredEvent();

		EventType type = new EventType("Type", dataType); // should we use
IDL typecode?
		FixedEventHeader fixed = new FixedEventHeader(type,"event");

		Property variable[] = new Property[0];

		dataEvent.header = new EventHeader(fixed, variable);

		dataEvent.filterable_data = new Property[4];

		Any timeAny = orb.create_any();
		timeAny.insert_string(timestamp.toString());
		dataEvent.filterable_data[0] = new Property("timestamp", timeAny);

		Any timeNanosAny = orb.create_any();
	
timeNanosAny.insert_longlong(TimestampConverter.getTimeAsNanos(timestamp));
		dataEvent.filterable_data[1] = new Property("timestampNanos",
timeNanosAny);

		Any idAny = orb.create_any();
		idAny.insert_string( id);
		dataEvent.filterable_data[2] = new Property("Id", idAny);

		Any nameAny = orb.create_any();
		nameAny.insert_string(name);
		dataEvent.filterable_data[3] = new Property("name", nameAny);

These fields in the Notification message are in all the events so I
don't think they are the culprit.

Let me know if you need any other info.

Thanks!

Rob

On Aug 10, 11:19 am, "Johnny Willemsen" <jwillem... at remedy.nl> wrote:
> Hi,
>
> Thanks for using the PRF form. Can you give insight in the type of structs
> you send? Simon, can you have a look, you made some changes between 1.5.9
> and 1.5.10 related to indirect typecodes which should have improved
> interoperability betwene JacORB and TAO.



More information about the Ace-users mailing list