无法阅读预约详情EWS

时间:2018-01-29 12:09:54

标签: java exchangewebservices

这是我的代码:

CalendarView cView = new CalendarView(startDate, endDate, 100);
PropertySet PropSet = new PropertySet(AppointmentSchema.Subject, 
            AppointmentSchema.Start,
            AppointmentSchema.End, 
            AppointmentSchema.IsAllDayEvent, 
            AppointmentSchema.IsMeeting,
            AppointmentSchema.IsRecurring, 
            AppointmentSchema.IsCancelled,
            AppointmentSchema.IsDraft, 
            AppointmentSchema.Location,
            AppointmentSchema.Resources,
            AppointmentSchema.RequiredAttendees, 
            AppointmentSchema.OptionalAttendees,
            AppointmentSchema.LegacyFreeBusyStatus,
            AppointmentSchema.Organizer, 
            AppointmentSchema.Body,
            AppointmentSchema.Sensitivity,
            AppointmentSchema.AppointmentReplyTime,
            AppointmentSchema.AppointmentSequenceNumber,
            AppointmentSchema.AppointmentState,
            AppointmentSchema.AppointmentType,
            AppointmentSchema.ConferenceType,
            AppointmentSchema.DateTimeCreated,
            AppointmentSchema.Duration,
            AppointmentSchema.EndTimeZone,
            AppointmentSchema.HasAttachments,
            AppointmentSchema.ICalDateTimeStamp,
            AppointmentSchema.ICalRecurrenceId,
            AppointmentSchema.ICalUid,
            AppointmentSchema.Id,
            AppointmentSchema.Importance,
            AppointmentSchema.IsOnlineMeeting,
            AppointmentSchema.IsReminderSet,
            AppointmentSchema.IsResponseRequested,
            AppointmentSchema.IsUnmodified,
            AppointmentSchema.LastModifiedTime,
            AppointmentSchema.LegacyFreeBusyStatus,
            AppointmentSchema.MeetingRequestWasSent,
            AppointmentSchema.MyResponseType,
            AppointmentSchema.MeetingWorkspaceUrl,
            AppointmentSchema.NetShowUrl,
            AppointmentSchema.OriginalStart,
            AppointmentSchema.ParentFolderId,
            AppointmentSchema.Recurrence,
            AppointmentSchema.ReminderDueBy,
            AppointmentSchema.ReminderMinutesBeforeStart,
            AppointmentSchema.StartTimeZone,
            AppointmentSchema.WebClientEditFormQueryString,
            AppointmentSchema.WebClientReadFormQueryString);
cView.setPropertySet(PropSet);
FindItemsResults<Appointment> results = service.findAppointments(folder.getId(),cView);

当我在迭代results时,它会抛出以下异常:

microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException:
    The request failed. The property null can't be used in FindItem request.

1 个答案:

答案 0 :(得分:0)

是的,它得到了。我必须加载属性Set in for循环,如

{{1}}