在EWS中通过ICalUid召开会议

时间:2015-11-13 11:59:55

标签: xml soap exchange-server exchangewebservices

我试图向我的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"没有任何影响?

1 个答案:

答案 0 :(得分:1)

在请求XML中使用3代替0x03。请求本身中的PropertyId 定义为intint类型的XML定义doesn't allow hex encoding