BizTalk One way Send port custom behaviour AfterReceiveReply not trigged

AskQues 1 Reputation point
2021-03-05T12:54:32.35+00:00

I am having a messaging-only one-way integration.

Receiving a message from source and sending to a Restful service in a one-way send port with WCF-WebHTTP adapter configured. No orchestration involved.

In the send port, I have a custom behavior where I prepare the message before sending it to the Rest service. This custom behavior is an implementation of IClientMessageInspector interface wherein the BeforeSendRequest I prepare the message before it's sent to the Rest service.
The message is getting delivered as expected.

Sometimes due to the error in the data, the Restful service returns an HTTP 400 error which I am trying to capture in my messaging only configuration, specifically in the AfterReceiveReply section of the behavior. But AfterReceiveReply method is not getting triggered when the Restful service returns HTTP 400. (I attached a debugger and also have trace lines) I believe it could trigger if the service returns a proper response but not HTTP 400 (not tested non-http/400 status yet).

I have seen someone asked similar questions in the other forums, not sure what was the solution. Am I missing anything?

Microsoft BizTalk Server
Microsoft BizTalk Server
A family of Microsoft server products that support large-scale implementation management of enterprise application integration processes.
349 questions
0 comments No comments
{count} votes