views:

156

answers:

1

Hi,

We have a .NET client calling a Java webservice using SSL. Sometimes the call fails due to poor connectivity (the .NET Client is a UI that is used from the weirdest locations). 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 solely with specific types of connectivity exceptions (and not for exceptions generated by the web service itself).

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

Thanks, yonadav

+1  A: 

Check out the Michelle Bustamante's Exception Handling Proxy Generator. It automatically handles retries:

http://wcfproxygenerator.codeplex.com/

From the site:

This custom tool extends WCFProxyGenerator to provide an exception handling proxy. It generates an additional proxy called ExceptionHandlingProxy which inherits ExceptionHandlingProxyBase - the latter of which implements the meat of the proxy's functionality. The result is that you can choose to use the default proxy that inherits ClientBase or ExceptionHandlingProxy which encapsulates managing the lifetime of the channel factory and channel. ExceptionHandlingProxy respects your selections in the Add Service Reference dialog with respect to asynchronous methods and collection types.

lsb
Thanks for the answer. This solution appears fairly complicated, are there no simpler solutions? Did MS not include an extension framework for ClientBase without requiring to replace the generator?
Yon