【问题标题】:Exchange 2007 ews (Web Service) - finding out who has accepted to attend meeting?Exchange 2007 ews(Web 服务) - 找出谁已同意参加会议?
【发布时间】:2014-07-18 11:01:24
【问题描述】:

我是使用 Exchange EWS 的新手,无法在文档或在线找到任何对此的参考。

我正在连接到我的 Exchange 2007 服务器并使用 PHP SoapClient 检索给定帐户的日历会议列表。这是有效的,正在检索所有会议作为 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] => 
        )

【问题讨论】:

    标签: php exchangewebservices exchange-server-2007


    【解决方案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++;
            }
        }
    }
    

    【讨论】:

    • 嗨@Alex,感谢您的帮助,但我对您的回答有些困惑。您是否在答案中使用某种形式的库,因为我只是使用 PHP SOAP 客户端?除非我弄错了,否则没有 PHP 类 Appointment 并且 EWS 响应日历约会请求返回的对象没有属性“RequiredAttendees”。
    • 您似乎最近编辑了您的问题。我和@Mimi Gentz 以为你在用 C# 编程。我不知道如何在 PHP 中做到这一点。对不起
    • 嗨@Alex,不,我的问题总是说 PHP 并被标记为 PHP。我对其进行了编辑以添加 Web 服务返回的数据示例。不过,感谢您尝试提供帮助。
    【解决方案2】:

    这个答案是一个暂定的解决方案,但据我所知,它似乎有效。

    因此,要使用 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。所有其他会议都显示为“未知”作为 ResponseType。

    【讨论】:

    • 您需要获得查看其他人日历的权限才能查看他们组织的会议的回复。
    【解决方案3】:

    您需要计算 MeetingResponseType 为 Accept 的与会者人数。请参阅此类似帖子:Count the number of attendees, that have accepted a meeting with EWS

    【讨论】:

      猜你喜欢
      • 2012-12-18
      • 2011-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-20
      • 2013-09-28
      • 2016-05-20
      相关资源
      最近更新 更多