BizTalk Catch Http Response Code

前端 未结 2 1001
不思量自难忘°
不思量自难忘° 2021-01-05 16:27

I have a orchestration which is receive a request from local rest service then send request to another remote Rest Service then if the remote service returns a response succ

相关标签:
2条回答
  • 2021-01-05 16:52

    Yes there is an issue with the WCF-WebHttp adapter in that it does not set the Message Type context property if there is a fault and so it then does not go the the Fault type defined on the port.
    The only way to catch it is in a System.Exception block.

    See my blog post BizTalk 2013 R2 known bugs, issues & quirks, BUG: BIZTALK WCF-WEBHTTP ADAPTER DOES NOT SET MESSAGE TYPE ON ERROR

    Update: The below is no longer true after CU 5 for BizTalk 2013 R2, it now throws an error.

    Also please note that if the end systems throws a 500 status code, it is NOT thrown as an error at all and you have to check the status code yourself.

    See BizTalk WCF-WebHttp adapter does not detect 500 error

    0 讨论(0)
  • 2021-01-05 16:53

    Actually you can't catch those kind of exception without some additional line of codes :) because when you catch this exception at the orchestration level the WCF adapter has already encapsulated it and you can't access to the error code, check this article for handling those kind of errors http://social.technet.microsoft.com/wiki/contents/articles/16625.biztalk-server-rest-services-error-handling.aspx

    0 讨论(0)
提交回复
热议问题