来自邮件加载项的UpdateItem EWS调用的内部服务器错误 [英] Internal server error with UpdateItem EWS call from Mail Addin

查看:57
本文介绍了来自邮件加载项的UpdateItem EWS调用的内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用makeEwsRequestAsync在我刚刚通过与CopyItem一起使用的另一个makeEwsRequestAsync进行复制的电子邮件上发出UpdateItem调用.但是,对UpdateItem的响应如下:

I'm using makeEwsRequestAsync to issue an UpdateItem call on an email I just made a copy of through another makeEwsRequestAsync I used with CopyItem. However, the response for UpdateItem is as follows:

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">*</Action></s:Header><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode><faultstring xml:lang="en-US">An internal server error occurred. The operation failed.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorInternalServerError</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">An internal server error occurred. The operation failed.</e:Message></detail></s:Fault></s:Body></s:Envelope>

有什么想法吗?以下是我正在拨打的电话.我的目标是创建电子邮件的副本,更改主题行和收件人并发送(模拟转发).奇怪的是,当我在OWA中运行Mail Addin时,甚至都没有发生对UpdateItem的调用,但它在Outlook 2016中有效.我现在暂时忽略它

Any ideas? Below is the call I'm making. My goal is to create a copy of an email, change the subject line and recipient and send it (to emulate doing a forward). What's odd is that my call to UpdateItem doesn't even occur when I run the Mail Addin in OWA, but it works in Outlook 2016. I'll ignore that for now lol

<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'               xmlns:t='http://schemas.microsoft.com/exchange/services/2006/types'>  <soap:Header>     <t:RequestServerVersion Version='Exchange2013'/>  </soap:Header>  <soap:Body>'<UpdateItem MessageDisposition='SaveOnly' ConflictResolution='AutoResolve' xmlns='http://schemas.microsoft.com/exchange/services/2006/messages'> <ItemChanges> <t:ItemChange> <t:ItemId Id='AAMkADk0OGI2NTc3LTZkY2QtNDc1NS05MWM1LTZlNmRhMjQ4MjRlMABGAAAAAACRc/2u6ZxxTKKnN1SuVEBWBwCiPid+VwI1QKpXdMXuhotWAAAAAAEMAACiPid+VwI1QKpXdMXuhotWAADwH8K3AAA=' ChangeKey='CQAAABYAAACiPid+VwI1QKpXdMXuhotWAADvtGmZ'/> <t:Updates> <t:SetItemField> <t:FieldURI FieldURI='item:Subject'/> <t:Message> <t:Subject>UPDATED SUBJECT</t:Subject> </t:Message> </t:SetItemField> </t:Updates> </t:ItemChange> </ItemChanges> </UpdateItem>   </soap:Body></soap:Envelope>

推荐答案

我可以看到您的XML有一个问题,您在Body和UpdateItem之间有一个额外的'

I can see one problem with your XML you have an extra ' in (between Body and UpdateItem)

< soap:Body>'< UpdateItem MessageDisposition ='SaveOnly'

在删除请求后,对我来说一切正常,您应该确保拥有最新的changekey,并且尝试更新的项应位于运行AddIn的邮箱中

With that removed your request work okays for me, you should make sure you have the latest changekey and the Item your trying to update should be located in the Mailbox where the AddIn is running

欢呼格伦

这篇关于来自邮件加载项的UpdateItem EWS调用的内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆