com.microsoft.ews-java-api:ews-java-api:2.0を使用して、MS Exchange カレンダーで予定を作成および更新しています。どちらも私のテスト環境では問題なく動作しています。顧客の環境 (別の Exchange サーバー) では、予定の作成は機能しますが、次のコードを実行して更新すると例外が発生します。
// Init
ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
WebCredentials webCredentials = new WebCredentials(exchangeUser, exchangePassword);
URI exchangeUri = new URI(exchangeUrl);
exchangeService.setCredentials(webCredentials);
exchangeService.setUrl(exchangeUri);
// Creating an appointment. This works on both environments.
Mailbox mailbox = new Mailbox("some@mail.com");
FolderId folderId = new FolderId(WellKnownFolderName.Calendar, mailbox);
Appointment appointment = new Appointment(exchangeService);
appointment.save(folderId);
// Keep ID for updating later on ...
model.setAppointmentId(appointment.getId().getUniqueId());
// ...
// Updating an appointment. This only works on my test environment.
ItemId itemId = new ItemId();
itemId.setUniqueId(model.getAppointmentId());
Appointment appointment = Appointment.bind(exchangeService, itemId); // The exception occurs here!
appointment.update(ConflictResolutionMode.AlwaysOverwrite);
そして、これは私が得る例外です
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed.
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.internalBindToItems(ExchangeService.java:1343)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToItem(ExchangeService.java:1378)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToItem(ExchangeService.java:1395)
at microsoft.exchange.webservices.data.core.service.item.Appointment.bind(Appointment.java:118)
at microsoft.exchange.webservices.data.core.service.item.Appointment.bind(Appointment.java:133)
An internal server error occurred. The operation failed.
実際には役立つ例外ではありません。これが失敗する理由はありますか?または、より多くの情報を取得する方法は?