ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

MeetingMessage returns the wrong schema

Open Noblebrown opened this issue 12 years ago • 2 comments

MeetingMessage.getSchema() returns an EmailMessageSchema when it should return the MeetingMessageSchema. This affects the child classes of MeetingCancellation and MeetingResponse. MeetingRequest is not affected.

The issue is that both aforementioned child classes rely on MeetingMessage to return a schema. MeetingMessage.getSchema() calls MeetingMessageSchema.getInstance(). This method is not present on MeetingMessageSchema and goes up to EmailMessageSchema.getInstance(), which returns an EmailMessageSchema for the two classes, omitting additional properties from MeetingMessageSchema.

MeetingMessageSchema should return its own instance directly and not rely on its parent class.

Noblebrown avatar Sep 01 '14 19:09 Noblebrown

Following on from this, once the correct Schema instance is returned, MeetingMessage.java should be augmented with getter methods to return its properties, as per the types.xsd.

jimdunkerton avatar Sep 07 '14 17:09 jimdunkerton

Definitely. That likely warrants a separate enhancement issue.

Noblebrown avatar Sep 07 '14 18:09 Noblebrown