These are chat archives for OfficeDev/ews-java-api

31st
Oct 2014
Bela Borbely
@belaborbely
Oct 31 2014 10:50
Hi, is it possible to get GlobalUniqueId of a CalendarItem?
I tried this: ExtendedPropertyDefinition guid = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 3, MapiPropertyType.Binary);
OutParam guidRet = new OutParam();
appt.tryGetProperty(guid, guidRet);
Noble Brown
@Noblebrown
Oct 31 2014 21:48

You have the correct property definition, but you'll need to explicitly load it once you've fetched the Appointment. It won't be loaded if you use bind, search, etc even if you request it. It must be loaded after retrieval. As a general rule, I'll usually do a search/bind/etc using PropertySet.IdOnly, then load a PropertySet I've constructed with the values I wish to retrieve. For example:

Appointment appt = Appointment.bind(exchangeService, new ItemId("..."), PropertySet.IdOnly);
PropertySet myProperties = new PropertySet();
myProperties.add(...); //Add whatever you want to load into the Appointment including the GlobalUniqueId
appt.load(myProperties);

Now the GlobalUniqueId should be loaded and you can retrieve it.

Noble Brown
@Noblebrown
Oct 31 2014 22:13

As for features in differing versions of Exchange, the best I've been able to find is this:

http://msdn.microsoft.com/en-us/library/office/bb409286%28v=exchg.150%29.aspx

It details EWS operations and the Exchange version in which they debuted. Perhaps not a perfect format for a feature diff, but it should be sufficient as a starting point to evaluate which operations will work on certain versions and which operations would need to be added if Exchange 2013+ support is built into EWS Java. The catch is that it may not always indicate when particular operations may have been updated, ie, adding new types to existing objects/operations. At least one is marked as such, but I'm not sure if that's comprehensive.

I have yet to find copies of the WSDL/XSD files from Exchange offered in their entirety by Microsoft, although it's possible I've missed them. It would be a handy and easily parsed reference if they were made available for download as most folks don't have each version of Exchange running to retrieve them.