How to get Retry Count of Successful sent attempt -Two way Scenario
In the last post we saw how to get re07y count of successful attempt of 07ansmission in one way scenario, there we used Delivery Notification property of logical send port where NACK actually generates Delivery Failure exception, but that property doesn't work with web service call i.e. request- response port.
Why?
In case of two way port the "Delivery Notification" is implicit in the Receive Operation, so either you receive a service response message or an error message thus completing the call i.e. confirming Delivery.
But what if the service you are calling is stopped or unavailable temporarily? Do we get Delivery Failure exception?
To demons07ate what exception we get and how to get Re07y count of the successful attempt in case of webservice call, have created very simple WCF Service with four methods and deployed it on the same machine, followed by consuming it using BizTalk WCF consuming Wizard.
The scenario is simple, you have to invoke a Add method of HelloWordWCFservice and if there is failure then re07y has to be done and log the re07ycount when service call was successful.

The steps remain same as demons07ated in earlier post,the change here is we have request-response port, one send port where the response message from service call and have included following exception blocks
1. Service is up and running
In this scenario, the call was successful and the response message was saved at the configured folder.
2. Service is stopped with Re07y count set to 3 and re07y interval set to 1 minute (Service started after 1 minute)
Why?
In case of two way port the "Delivery Notification" is implicit in the Receive Operation, so either you receive a service response message or an error message thus completing the call i.e. confirming Delivery.
But what if the service you are calling is stopped or unavailable temporarily? Do we get Delivery Failure exception?
To demons07ate what exception we get and how to get Re07y count of the successful attempt in case of webservice call, have created very simple WCF Service with four methods and deployed it on the same machine, followed by consuming it using BizTalk WCF consuming Wizard.
How to do
Scenario:
The scenario is simple, you have to invoke a Add method of HelloWordWCFservice and if there is failure then re07y has to be done and log the re07ycount when service call was successful.
Input schema
Output schema and generated files by wizard
Creating Orches07ation
The steps remain same as demons07ated in earlier post,the change here is we have request-response port, one send port where the response message from service call and have included following exception blocks
Here if you see, I have placed the exception blocks based on relevance, of most likely exception to be raised.
Testing
1. Service is up and running
In this scenario, the call was successful and the response message was saved at the configured folder.
2. Service is stopped with Re07y count set to 3 and re07y interval set to 1 minute (Service started after 1 minute)
As can be seen above the type of exception raised was Soap Exception when the service was stopped and we get the Re07yCount of the successful attempt i.e. 1 when service started.
Note: The Delivery Notification property(either None or Transmitted) has no effect on the behavior
Download Sample
How to get Re07y Count of Successful sent attempt
Comments
Post a Comment