Exchange Web服务(EWS)在成功的FindFolder响应中间给出内部服务器错误。

huangapple go评论71阅读模式
英文:

Exchange web service (EWS) Gives Internal server error in the middel of successful FindFolder response

问题

I'm making a Office Add-in in Javascript, and I suddenly gets an Internal Server Error xml document in the middle of the successful soap response document.

这段代码中间突然出现了一个内部服务器错误的 XML 文档,尽管之前一切正常。

This used to work but I'm currently getting the response with a new failure xml document in the middel. See FolderId Id=" and then a new xml document stars. I have never seen this before. Does anyone have any idea of what is wrong, or how this can be diagnosed? The response has been snipped a bit to be easier to read and apparently the namespace links causes the post to be marked as spam.

这段代码曾经是有效的,但是现在我得到的响应中间出现了一个新的失败的 XML 文档,看起来是在 FolderId Id=" 处开始的。我之前从未遇到过这种情况。有没有人知道出了什么问题,或者如何进行诊断?响应的内容已经被剪裁以便阅读,显然命名空间链接导致帖子被标记为垃圾邮件。

I'm calling EWS like this:

我是这样调用 EWS 的:

const req = "...SOAP 请求的 XML...";
Office.context.mailbox.makeEwsRequestAsync(req, (asyncResult) => {
   logger.log("FindFolder: " + asyncResult.value);
});

The Exchange server is Office 365. The folder list I'm trying to get is a list of public folders, and it worked a few days ago. I have moved a few folders around, and got this after the move. I have since deleted all folders and tested, created new folders and tested. Everytime the same error. Depending on how many folders is returned the error breaks off the response in different places.

Exchange 服务器是 Office 365。我正在尝试获取的文件夹列表是一个公共文件夹列表,几天前它还是正常工作的。我移动了几个文件夹,然后就出现了这个问题。我后来删除了所有的文件夹并进行了测试,创建了新的文件夹并进行了测试。每次都是同样的错误。根据返回的文件夹数量,错误会在响应中的不同位置断开。

英文:

I'm making a Office Add-in in Javascript, and I suddenly gets an Internal Server Error xml document in the middle of the successful soap response document.

This used to work but I'm currently getting the response with a new failure xml document in the middel. See FolderId Id=" and then a new xml document stars.
I have never seen this before. Does anyone have any idea of what is wrong, or how this can be diagnosed?
The response has been snipped a bit to be easier to read and apparently the namespace links causes the post to be marked as spam.

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope>
...
		<s:Body>
			<m:FindFolderResponse>
				<m:ResponseMessages>
					<m:FindFolderResponseMessage ResponseClass="Success">
						<m:ResponseCode>NoError</m:ResponseCode>
						<m:RootFolder TotalItemsInView="1" IncludesLastItemInRange="true">
							<t:Folders>
								<t:Folder>
									<t:FolderId Id="
										<?xml version="1.0" encoding="utf-8"?>
										<s:Envelope>
											<s:Header>
												<Action s:mustUnderstand="1">*</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>

I'm calling EWS like this:

const req = "...SOAP Request XML...";

Office.context.mailbox.makeEwsRequestAsync(req, (asyncResult) => { 
   logger.log("FindFolder: " + asyncResult.value);
});

The Exchange server is Office 365.
The folder list I'm trying to get is a list of public folders, and it worked a few days ago. I have moved a few folders around, and got this after the move. I have since deleted all folders and tested, created new folders and tested. Everytime the same error. Depending on how many folders is returned the error breaks off the response in different places.

答案1

得分: 4

(Sorry, 我无法仅评论,只能提供答案!)

我们也发现这个问题在过去几天开始出现。当使用EWS托管API时,我们发现了相同的问题。总的来说,这看起来像是EWS端的问题。从我所看到的情况来看,这似乎是一个真正的问题,而不仅仅是行为上的改变。

关于此问题的GitHub EWS托管API讨论线程:https://github.com/OfficeDev/ews-managed-api/issues/294

而且,我在Microsoft Q&A上发布了相关信息:https://learn.microsoft.com/en-us/answers/questions/1229639/exchange-web-services-ews-findfolders-produces-a-5

英文:

(Sorry, I can't comment only place an answer!)

We've also found this problem started occurring in the last few days. We've found the same problem happening when using the EWS Managed API. In summary, this looks like a problem on the EWS end. From what I can tell, this looks like a genuine problem rather than just a change in behaviour.

GitHub EWS Managed API thread about this issue: https://github.com/OfficeDev/ews-managed-api/issues/294

And I have posted about it on Microsoft Q&A here: https://learn.microsoft.com/en-us/answers/questions/1229639/exchange-web-services-ews-findfolders-produces-a-5

答案2

得分: 1

这是错误响应的示例:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Header>
		<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="6298" MinorBuildNumber="30" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
	</s:Header>
	<s:Body>
		<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
			<m:ResponseMessages>
				<m:GetFolderResponseMessage ResponseClass="Success">
					<m:ResponseCode>NoError</m:ResponseCode>
					<m:Folders>
						<t:Folder>
							<t:FolderId Id="<?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>"/>
						</t:Folder>
					</m:Folders>
				</m:GetFolderResponseMessage>
			</m:ResponseMessages>
		</m:GetFolderResponse>
	</s:Body>
</s:Envelope>

请注意,"InternalServerError" 的 XML 消息与原始的 GetFolderResponse 消息合并在一起,因此响应不再可读。这个问题很可能是由 Microsoft 方面的某个地方引起的。

英文:

We have same problem.
I attach listener to the EWS and the error happeens in GetFolder, FindItems etc in case if we query the PublicFolders

This is example of the wrong response I got

    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Envelope xmlns:s=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
&lt;s:Header&gt;
	&lt;h:ServerVersionInfo MajorVersion=&quot;15&quot; MinorVersion=&quot;20&quot; MajorBuildNumber=&quot;6298&quot; MinorBuildNumber=&quot;30&quot; Version=&quot;V2018_01_08&quot; xmlns:h=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;/&gt;
&lt;/s:Header&gt;
&lt;s:Body&gt;
	&lt;m:GetFolderResponse xmlns:m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot;&gt;
		&lt;m:ResponseMessages&gt;
			&lt;m:GetFolderResponseMessage ResponseClass=&quot;Success&quot;&gt;
				&lt;m:ResponseCode&gt;NoError&lt;/m:ResponseCode&gt;
				&lt;m:Folders&gt;
					&lt;t:Folder&gt;
						&lt;t:FolderId Id=&quot;&lt;?xml version=&quot; 1.0&quot; encoding=&quot;utf-8&quot; ?&gt;&lt;s:Envelope xmlns:s=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
							&lt;s:Header&gt;
								&lt;Action s:mustUnderstand=&quot;1&quot; xmlns=&quot;http://schemas.microsoft.com/ws/2005/05/addressing/none&quot;&gt;*&lt;/Action&gt;
							&lt;/s:Header&gt;
							&lt;s:Body&gt;
								&lt;s:Fault&gt;
									&lt;faultcode xmlns:a=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot;&gt;a:ErrorInternalServerError&lt;/faultcode&gt;
									&lt;faultstring xml:lang=&quot;en-US&quot;&gt;An internal server error occurred. The operation failed.&lt;/faultstring&gt;
									&lt;detail&gt;
										&lt;e:ResponseCode xmlns:e=&quot;http://schemas.microsoft.com/exchange/services/2006/errors&quot;&gt;ErrorInternalServerError&lt;/e:ResponseCode&gt;
										&lt;e:Message xmlns:e=&quot;http://schemas.microsoft.com/exchange/services/2006/errors&quot;&gt;An internal server error occurred. The operation failed.&lt;/e:Message&gt;
									&lt;/detail&gt;
								&lt;/s:Fault&gt;
							&lt;/s:Body&gt;
						&lt;/s:Envelope&gt;

Look on t:FolderId Id="
As you can see the "InternalServerError" xml message merged with original GetFodlerResponse message and response no more readable!
I pretty sure the problem come somewhere from Microsoft side.

huangapple
  • 本文由 发表于 2023年4月13日 19:19:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76004813.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定