【问题标题】:Getting Meeting by ICalUid in EWS在 EWS 中通过 ICalUid 召开会议
【发布时间】:2016-02-15 00:12:28
【问题描述】:

我正在尝试向我的 Exchange 2010 SP2 服务器发送一个基本的 SOAP 请求,以便通过 IcalUid 找到一个会议,该会议受到 this great answer by Glen 的启发。

'<soap:Envelope ' +
'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
'xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" ' +
'xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" ' +
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'  <soap:Header>' +
'    <t:RequestServerVersion Version="Exchange2010_SP2"/>' +
'  </soap:Header>' +
'  <soap:Body>' +
'    <m:FindItem Traversal="Shallow">' +
'      <m:ItemShape>' +
'        <t:BaseShape>AllProperties</t:BaseShape>' +
'      </m:ItemShape>' +
'      <m:Restriction>' +
'        <t:IsEqualTo>' +
'          <t:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyId="0x03" PropertyType="Binary"/>' +
'          <t:FieldURIOrConstant>' +
'            <t:Constant Value="bbkpr55lqbc49acfg9objhg40g" />' +
'          </t:FieldURIOrConstant>' +
'        </t:IsEqualTo>' +
'      </m:Restriction>' +
'      <m:ParentFolderIds>' +
'        <t:DistinguishedFolderId Id="calendar" />' +
'      </m:ParentFolderIds>' +
'    </m:FindItem>'
'  </soap:Body>' +
'</soap:Envelope>';

这会导致以下错误:

The 'PropertyId' attribute is invalid - The value '0x03' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:int' - The string '0x03' is not a valid Int32 value.

明明不是Int32的值,可是为什么PropertyType="Binary"没有任何作用呢?

【问题讨论】:

    标签: xml soap exchange-server exchangewebservices


    【解决方案1】:

    只需在请求 XML 中使用 3 而不是 0x03。请求本身中的PropertyId被定义为int,XML定义doesn't allow hex encoding属于int类型。

    【讨论】:

    • 啊,你是对的。我不知道为什么我没有建立这种联系。如您所说,仔细查看托管 API,它将十六进制值转换为整数。非常感谢 dkarp!
    猜你喜欢
    • 1970-01-01
    • 2012-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-02
    相关资源
    最近更新 更多