我是使用Exchange EWS的新手,并且无法在文档或在线中找到对此的任何引用。
我正在使用PHP SoapClient连接到我的Exchange 2007服务器并检索给定帐户的日历会议列表。这是有效的,并且正在将所有会议检索为CalendarItem对象,然后我可以在我的PHP脚本中使用它。
然而,我真正需要的是知道谁接受参加会议。我收集到CalendarItem对象的DisplayTo属性告诉我们谁被邀请,但肯定有些人可能已经拒绝了。所以,如果我想知道谁会在那里,我怎么能得到这些信息?
这似乎是有用的信息(例如计划餐饮或其他),所以它似乎不太可能不通过网络服务公开,但我无法找到如何发现这些信息。
有人可以帮忙吗?
编辑:只是为了澄清Exchange 2007 Web服务返回的内容,这是服务为每次会议返回的内容:
[0] => stdClass Object
(
[ItemId] => stdClass Object
(
[Id] => AAAQAHN0ZXBld0BNQkEuYWMud
[ChangeKey] => DwAAABYA
)
[ParentFolderId] => stdClass Object
(
[Id] => AQAQAHN0ZXBld0BNQkEuYWM
[ChangeKey] => AQ
)
[ItemClass] => IPM.Appointment.Occurrence
[Subject] => IT Meeting
[Sensitivity] => Normal
[DateTimeReceived] => 2013-09-11T13:06:27Z
[Size] => 6724
[Importance] => Normal
[IsSubmitted] =>
[IsDraft] =>
[IsFromMe] =>
[IsResend] =>
[IsUnmodified] =>
[DateTimeSent] => 2013-09-11T13:06:27Z
[DateTimeCreated] => 2013-09-11T13:06:27Z
[ReminderDueBy] => 2014-08-04T10:30:00Z
[ReminderIsSet] => 1
[ReminderMinutesBeforeStart] => 15
[DisplayCc] =>
[DisplayTo] => Bob, Frank, Tim, Alf, Juanita
[HasAttachments] =>
[Culture] => en-US
[Start] => 2014-06-02T10:30:00Z
[End] => 2014-06-02T12:00:00Z
[IsAllDayEvent] =>
[LegacyFreeBusyStatus] => Busy
[Location] => Meeting Room
[IsMeeting] => 1
[IsRecurring] => 1
[MeetingRequestWasSent] =>
[IsResponseRequested] => 1
[CalendarItemType] => Occurrence
[MyResponseType] => Accept
[Organizer] => stdClass Object
(
[Mailbox] => stdClass Object
(
[Name] => Bob
)
)
[Duration] => PT1H30M
[TimeZone] => (UTC) Dublin, Edinburgh, Lisbon, London
[AppointmentReplyTime] => 2013-09-11T13:07:00Z
[AppointmentSequenceNumber] => 0
[AppointmentState] => 3
[ConferenceType] => 0
[AllowNewTimeProposal] => 1
[NetShowUrl] =>
)
答案 0 :(得分:1)
您可以在约会中循环播放与会者,并检查他们的回复类型。我已经为您编写了一段扩展代码,以帮助您理解。我希望这会有所帮助:)
Appointment existingAppointment;
int acceptCount = 0;
if (existingAppointment.RequiredAttendees.Count > 0)
{
foreach(Attendee att in existingAppointment.RequiredAttendees)
{
if ((att.ResponseType.HasValue) && (att.ResponseType.Value == MeetingResponseType.Accept))
{
acceptCount++;
}
}
}
答案 1 :(得分:1)
这个答案是一个试探性的解决方案,但就我所知,它似乎正在起作用。
因此,要使用PHP SOAPClient形成SOAP请求以获取每个约会的约会详细信息,如原始问题所示,我使用以下内容:
//Loop through each CalendarItem in the CalendarItems collection
//Using a "by reference" pointer as I want to add the extra information to the original object.
foreach($calendaritems as &$b){
$NewSearch->Traversal = "Shallow";
$NewSearch->ItemShape->BaseShape = "AllProperties";
$NewSearch->ItemIds->ItemId = $b->ItemId;
$result = $client->GetItem($NewSearch);
//add the RequiredAttendees element to the original calendar item, just for convenience
$b->RequiredAttendees = $result->ResponseMessages->GetItemResponseMessage->Items->CalendarItem->RequiredAttendees;
}
但是,您似乎只能查看响应类型以满足您作为组织者所连接的帐户的会议请求。所有其他会议显示为"未知"作为ResponseType。
答案 2 :(得分:0)
您需要计算MeetingResponseType为Accept的与会者人数。看到类似的帖子:Count the number of attendees, that have accepted a meeting with EWS。