【问题标题】:Exchange Soap Update notes contact?Exchange Soap 更新说明联系人?
【发布时间】:2018-01-16 15:18:01
【问题描述】:

我无法执行更新联系人的 Soap Exchange 请求:PersonalNotes。

我没有在 msdn 上找到文档:https://msdn.microsoft.com/en-us/library/office/ee693002(v=exchg.80).aspx

这是我的肥皂代码:

<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="Exchange2016" />
<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />
</t:TimeZoneContext>
</soap:Header>
<soap:Body>
<m:UpdateItem MessageDisposition="SaveOnly" 
ConflictResolution="AlwaysOverwrite">
<m:ItemChanges>
<t:ItemChange>
<t:ItemId 
Id="AAMkAD...QAAAz9hI5AAA=" ChangeKey="EQAAAB...QAAAz9rdN" />
<t:Updates>

        <t:SetItemField>
        <t:FieldURI FieldURI="contacts:Notes" />
        <t:Contact>
            <t:Notes>TEST N</t:Notes>
        </t:Contact>
    </t:SetItemField>

</t:Updates>
</t:ItemChange>
</m:ItemChanges>
</m:UpdateItem>
</soap:Body>
</soap:Envelope>

这是显示的错误:

编辑联系人个人笔记的soap代码是什么?

【问题讨论】:

  • 您确定 ItemId 引用了联系人吗?如果您使用相同的 Id 和 ChangeKey 执行 GetItem,就像这里 link 所做的那样,它会返回什么?

标签: c# web-services soap exchangewebservices exchange-server-2016


【解决方案1】:

联系人中的备注字段是消息的正文属性,因此要更新您需要更新正文,例如

  <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="Exchange2013_SP1" />
    </soap:Header>
    <soap:Body>
      <m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
        <m:ItemChanges>
          <t:ItemChange>
            <t:ItemId Id="AAMkADczN=" ChangeKey="EQAAABYAAAB1EEf9R" />
            <t:Updates>
              <t:SetItemField>
                <t:FieldURI FieldURI="item:Body" />
                <t:Contact>
                  <t:Body BodyType="Text">test text</t:Body>
                </t:Contact>
              </t:SetItemField>
            </t:Updates>
          </t:ItemChange>
        </m:ItemChanges>
      </m:UpdateItem>
    </soap:Body>
  </soap:Envelope>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-13
    • 1970-01-01
    相关资源
    最近更新 更多