WCF-WebHTTP上的挂起实例请求响应发送端口未捕获完整的错误消息 [英] Suspended Instances on WCF-WebHTTP Solicit Request Response Send port not capturing complete error message

查看:103
本文介绍了WCF-WebHTTP上的挂起实例请求响应发送端口未捕获完整的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我们正在使用Biztalk 2013 R2版本并调用REST ODATA服务,当我们发送错误的查询语法进行服务时,会导致内部500服务器错误错误说明但在挂起的实例上没有捕获完整的错误。


BizTalk中捕获的错误:


System.Net.WebException:(500)内部服务器错误


  在Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)



Fiddler中捕获的错误:


{


" error" :{


" code" :"ServerErrorException"," message" :{


" lang" :"en-US","value", :"服务器无法理解您的OData API请求的URI,其中
包含无效字符文本序列:[[userId],[+],[eq],[+],['64' ]]。请检查查询语法的正确性,尤其是对于意外的空格或标点符号。有关API语法要求,请参阅https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/PRODUCTION/en-US"


< span lang ="EN-GB"style ="font-size:8.5pt; font-family:'Microsoft Sans Serif',sans-serif">}


}


}



如果有任何解决方法,请建议您获取完整的错误信息。


问候,


Vikingsss

解决方案

该错误将出现在错误消息中,但包含在看起来像SOAP错误的内容中消息(但未使用正确的消息类型设置)。 这是一个

已知问题
使用WCF-Webhttp适配器。   


我们通常只会在发送/接收周围的Orchestration Exception块中干净利落地处理404错误。通过检查整个错误消息是否包含一个表示"未找到"的字符串来获取。或者无论错误消息是什么,所有
else都抛出了ESB异常框架,因为你不应该得到其他错误类型,除非有根本性的错误。




Hi All,

We are using Biztalk 2013 R2 version and calling REST ODATA Service and when we send wrong query syntax to service it results into INTERNAL 500 Server Error with proper error explanation but complete error does not get captured on suspended instances.

Error Captured in BizTalk:

System.Net.WebException: (500) Internal Server Error

   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

Error Captured in Fiddler:

{

"error" : {

"code" : "ServerErrorException", "message" : {

"lang" : "en-US", "value" : "Server was unable to understand the URI of your OData API request, which contained the invalid character text sequence of: [[userId], [+], [eq], [+], ['64']] . Please check the correctness of your query syntax, especially for unexpected whitespace or punctuation. For API syntax requirements consult https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/PRODUCTION/en-US"

}

}

}

Please suggest if there is any fix for it to get complete error information.

Regards,

Vikingsss

解决方案

That error would be in the error message but wrapped up in what looks like a SOAP fault message (but not set with the correct message type).  This is a known issue with the WCF-Webhttp adapter.   

We usually only try and handle the 404 error cleanly in an Orchestration Exception block around the Send/Receive for a  GET, by checking if the whole error message contains a string that says "not found" or whatever the error message is, everything else is just thrown the ESB Exception Framework, as you should not get the other error type unless there is something fundamentally wrong.



这篇关于WCF-WebHTTP上的挂起实例请求响应发送端口未捕获完整的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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