交换肥皂更新备注联系方式?

时间:2018-01-16 15:18:01

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

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

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

这是我的肥皂代码:

.col-d-1 {
    &[class*='col-m-'] {
        background: red;
    }
}

显示错误:

enter image description here

编辑联系人PersonalNotes时要编写的soap代码是什么?

1 个答案:

答案 0 :(得分:0)

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

  <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>

相关问题