.NET Webservice Client: Answering Machine When Call Fails

We have a .NET client that calls a Java web service using SSL. Sometimes a call is interrupted due to poor communication (.NET Client is a user interface that is used in the strangest places). We would like to implement an automatic retry mechanism that will automatically retry a failed call X times before giving up. This should be done exclusively with specific exceptions for the connection (and not for exceptions thrown by the web service itself).

We tried to find how to do this at the Binding / Channel level, but failed ... any ideas?

Thank yonadav

+4
source share
1 answer

Check out Michelle Bustamante's Proxy Generator for exception handling. It automatically processes repetitions:

http://wcfproxygenerator.codeplex.com/

From the site:

This custom tool extends WCFProxyGenerator to provide a proxy exception handling server. It generates an additional proxy called ExceptionHandlingProxy, which inherits ExceptionHandlingProxyBase - the last of which implements meat proxy functionality. As a result, you can use the default proxy server, which inherits ClientBase or ExceptionHandlingProxy, which encapsulates the lifetime control of the factory channel and the channel. ExceptionHandlingProxy matches your choices in the Add Service dialog box regarding asynchronous methods and collection types.

+2
source

Source: https://habr.com/ru/post/1308344/


All Articles