OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
869 stars 560 forks source link

on issues of EWS #125

Open kervin521 opened 9 years ago

kervin521 commented 9 years ago

1.why can't CalendarView support page about EWS?can CalendarView extends PageView? 2.how to get location (or room email),startTime,endTime for Item about FindItemsResults? 3.how to get Attendees from Appointment, I think for-each "getItems()" of FindItemsResults , its result is null for "getRequiredAttendees()" of every Appointment; but when I add Appointment,getRequiredAttendees() add most of email.

baininghan commented 9 years ago

@805728578 1.CalendarView and PageView are BaseView's subclass.You can get resulsts of CalendarView to A custom paging. 2.You can fllowing to the sample:

ExchangeService service = ExchangeFactory.getExchangeService();
//...Your startDate and endDate
CalendarView view = new CalendarView(startDate, endDate);
FindItemsResults<Appointment> results = service.findAppointments(WellKnownFolderName.Calendar, view);
for(Appointment app : results.getItems()){
    System.out.println("Location : " + app.getLocation());
    System.out.println("StartDate : " + app.getStart());
    System.out.println("EndDate : " + app.getEnd());
}

3.I never met such a problem:

for(Attendee attendee : app.getRequiredAttendees()){
    System.out.println("UserName : " + attendee.getName());
    System.out.println("EmailAddress : " + attendee.getAddress());
}

I also in contact with the recently, hope I can communicate with each other