【问题标题】:EWS operations - get attendees of a meetingEWS 操作 - 获取会议的与会者
【发布时间】:2016-06-23 14:47:41
【问题描述】:

使用EWS operations 到目前为止,我能够在一个时间范围内获得所有会议。如何获得会议的与会者?

我已阅读here,我可以发送带有会议 ID 的附加请求,以获得附加属性 (LoadPropertiesForItem)。

对应的SOAP操作是什么?

谢谢

private String getXMLRequestForRetrieve( DateTime start, DateTime end, String meetingRoomEmailToQuery ){

    return ""+
        "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:typ=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:mes=\"http://schemas.microsoft.com/exchange/services/2006/messages\">"+
           "<soapenv:Header>"+
              "<typ:RequestServerVersion Version=\"Exchange2016\"/>"+
              "<typ:MailboxCulture>en-US</typ:MailboxCulture>"+
              "<typ:TimeZoneContext>"+
                "<typ:TimeZoneDefinition Id=\"W. Europe Standard Time\"/>"+
              "</typ:TimeZoneContext>"+
           "</soapenv:Header>"+
           "<soapenv:Body>"+
              "<mes:FindItem Traversal=\"Shallow\">"+
                 "<mes:ItemShape>"+
                    "<typ:BaseShape>AllProperties</typ:BaseShape>"+ // AllProperties, IdOnly
                    "<typ:AdditionalProperties>"+
                      "<typ:FieldURI FieldURI=\"item:Subject\" /> "+
                      "<typ:FieldURI FieldURI=\"item:DateTimeCreated\" />"+
                      "<typ:FieldURI FieldURI=\"item:Sensitivity\" />"+
                      "<typ:FieldURI FieldURI=\"calendar:Start\" />"+
                      "<typ:FieldURI FieldURI=\"calendar:End\" />"+
                      "<typ:FieldURI FieldURI=\"calendar:IsCancelled\" />"+
                      "<typ:FieldURI FieldURI=\"calendar:Organizer\"/>"+
                      // "<typ:FieldURI FieldURI=\"item:Body\" />"+
                      // "<typ:FieldURI FieldURI=\"calendar:RequiredAttendees\"/>"+
                    "</typ:AdditionalProperties>"+
                 "</mes:ItemShape>"+
                 "<mes:CalendarView MaxEntriesReturned=\"1000\""+
                        " StartDate=\""+start.toString(patternFormat)+
                        "\" EndDate=\""+end.toString(patternFormat)+"\"/>"+ // 2016-06-10T07:00:00Z
                 "<mes:ParentFolderIds>"+
                   "<typ:DistinguishedFolderId Id=\"calendar\">"+
                     "<typ:Mailbox>"+
                       "<typ:EmailAddress>"+meetingRoomEmailToQuery+"</typ:EmailAddress>"+
                     "</typ:Mailbox>"+
                   "</typ:DistinguishedFolderId>"+
                "</mes:ParentFolderIds>"+
              "</mes:FindItem>"+
           "</soapenv:Body>"+
        "</soapenv:Envelope>";
}

【问题讨论】:

    标签: exchangewebservices


    【解决方案1】:

    您需要发出 EWS GetItem 请求 https://msdn.microsoft.com/en-us/library/office/aa566013(v=exchg.150).aspx ,如果您尝试对多个项目执行此操作,则可以批处理 GetItem 请求以提高效率。

    【讨论】:

      【解决方案2】:

      我用这个 SOAP 请求解决了:

          private String getXMLReqForMeetingProperties(String itemId, String changeKey) { 
      
              return ""+
                  "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
                  "<soap:Envelope "+
                      "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "+
                      "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "+
                      "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" "+
                      "xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" "+
                      "xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">"+
                      "<soap:Header>"+
                         "<RequestServerVersion Version=\"Exchange2013\" "+
                          "xmlns=\"http://schemas.microsoft.com/exchange/services/2006/types\" soap:mustUnderstand=\"0\" />"+
                      "</soap:Header>"+
                      "<soap:Body>"+
                          "<m:GetItem Traversal=\"Shallow\">"+
                              "<m:ItemShape>"+
                                  "<t:BaseShape>IdOnly</t:BaseShape>"+
                                  "<t:AdditionalProperties>"+
                                      "<t:FieldURI FieldURI=\"item:Subject\"></t:FieldURI>"+
                                      // "<t:FieldURI FieldURI=\"item:Body\"></t:FieldURI>"+
                                      "<t:FieldURI FieldURI=\"item:TextBody\"></t:FieldURI>"+
                                  "</t:AdditionalProperties>"+
                              "</m:ItemShape>"+
                              "<m:ItemIds>"+
                                  "<t:ItemId Id=\""+itemId+"\" ChangeKey=\""+changeKey+"\"></t:ItemId>"+
                              "</m:ItemIds>"+
                          "</m:GetItem>"+
                      "</soap:Body>"+
                  "</soap:Envelope>";
          }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-07-21
        • 1970-01-01
        • 1970-01-01
        • 2011-11-20
        相关资源
        最近更新 更多