EWS Java获取约会与会者会议响应
我看过一些c代码来实现这一点,但不确定Java中的等价物是什么。也就是说 我一直在反复浏览所有可用的会议室,然后收集他们的约会,并试图获得他们的统计数据。除了实际的会议响应之外,我现在已经准备好了所有的东西,我专门加载与会者,我要做什么才能得到与会者的响应?当前所有响应均为“未知”EWS Java获取约会与会者会议响应,java,exchangewebservices,Java,Exchangewebservices,我看过一些c代码来实现这一点,但不确定Java中的等价物是什么。也就是说 我一直在反复浏览所有可用的会议室,然后收集他们的约会,并试图获得他们的统计数据。除了实际的会议响应之外,我现在已经准备好了所有的东西,我专门加载与会者,我要做什么才能得到与会者的响应?当前所有响应均为“未知” FindItemsResults<Appointment> aps = service.findAppointments(folderid, new CalendarView(startDate1,end
FindItemsResults<Appointment> aps = service.findAppointments(folderid, new CalendarView(startDate1,endDate1));
for (Item items : aps.getItems())
{
PropertySet ps = new PropertySet(ItemSchema.Subject);
ps.add(AppointmentSchema.RequiredAttendees);
ps.add(AppointmentSchema.OptionalAttendees);
ps.add(AppointmentSchema.Resources);
ps.add(AppointmentSchema.MyResponseType);
items.load(PropertySet.FirstClassProperties);
Appointment appt = (Appointment)items;
System.out.println("Required Attendees========"+appt.getRequiredAttendees().getCount());
System.out.println("Resource Count========"+appt.getResources().getCount());
System.out.println("Optional Attendees========"+appt.getOptionalAttendees().getCount());
int accepted=0;
AttendeeCollection RA=appt.getRequiredAttendees();
for (int i=0; i<appt.getRequiredAttendees().getCount(); i++){
System.out.println(RA.getPropertyAtIndex(i).getResponseType().equals(MeetingResponseType.Accept));
System.out.println(RA.getPropertyAtIndex(i).getName());
}
}
RA.getPropertyAtIndexi.getResponseType.toString 你应该得到你想要的
我注意到,在Outlook中,在响应会议邀请时,您必须在没有/有评论的情况下进行响应您只能通过查询组织者的日历来获取与会者的响应。所以 确保您具有所需的权限 使用组织者日历的文件夹ID
FolderId folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox("organizer@company.com"))
有关更多参考资料,请参阅
.您需要获取扩展属性: 在XML中,它被描述为:
<m:GetItem>
<m:ItemShape>
<t:AdditionalProperties>
<t:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33304" PropertyType="Integer" />
请注意,在文档中它是一个整数,但我发现它在某些服务器上返回字符串