I tried to add an attendee to an Appointment as explained in the wiki, by execute the following code:
PropertySet propSet = new PropertySet(BasePropertySet.FirstClassProperties); propSet.add(AppointmentSchema.OptionalAttendees); propSet.add(AppointmentSchema.RequiredAttendees); Appointment appointment = Appointment.bind(service, new ItemId(uniqueId), propSet); appointment.getRequiredAttendees().add("someone@somewhere.com"); appointment.update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToAll);
And I get the following error:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: Set action is invalid for property. at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278) at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267) at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165) at microsoft.exchange.webservices.data.core.ExchangeService.internalUpdateItems(ExchangeService.java:691) at microsoft.exchange.webservices.data.core.ExchangeService.updateItem(ExchangeService.java:762) at microsoft.exchange.webservices.data.core.service.item.Item.internalUpdate(Item.java:279) at microsoft.exchange.webservices.data.core.service.item.Appointment.update(Appointment.java:421)
I tried to add an attendee to an Appointment as explained in the wiki, by execute the following code:
PropertySet propSet = new PropertySet(BasePropertySet.FirstClassProperties); propSet.add(AppointmentSchema.OptionalAttendees); propSet.add(AppointmentSchema.RequiredAttendees); Appointment appointment = Appointment.bind(service, new ItemId(uniqueId), propSet); appointment.getRequiredAttendees().add("someone@somewhere.com"); appointment.update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToAll);
And I get the following error:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: Set action is invalid for property. at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278) at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267) at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165) at microsoft.exchange.webservices.data.core.ExchangeService.internalUpdateItems(ExchangeService.java:691) at microsoft.exchange.webservices.data.core.ExchangeService.updateItem(ExchangeService.java:762) at microsoft.exchange.webservices.data.core.service.item.Item.internalUpdate(Item.java:279) at microsoft.exchange.webservices.data.core.service.item.Appointment.update(Appointment.java:421)
Any idea why this is failing?