Re: Retry on certain exceptions?



That's an interesting solution to try. Thanks. If the web service fails
because of a sql exception, I'll end up getting a bunch of suspended
messages in the messagebox for each retry though right? And if i get my
custom exception I'll end up with 1 suspended message. My ideal scenario
would be no suspended messages if the web service throws my custom exception
(a handled error), and 1 suspended message if it's a sql error (or unhandled
exception).


"Matt Meleski" <MattMeleski@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13AF24B4-1345-476E-8FDD-80A9DA0CCCA4@xxxxxxxxxxxxxxxx
A way to approach this is to build your own Retry Pattern in
your orchestration to call the Web Service. Therefore:

1) for you Soap Send port set the Retry property to zero.
2) In your orchestration, then add a loop shape. Within that loop shape,
add
your existing shapes to call the Web Service -> with the Exception blocks.

Your Expression for you loop shape would be something like

intCounter <= intAllowedRetryAttempts && blnContinueLoop

Before your loop shape you would initialize your variables to something
like:

intCounter = 1;
intAllowedRetryAttempts = 3;
blnContinueLoop = true;

In the loop shape,after successfully calling your Web Service, you would
set :
blnContinueLoop = false;

In your custom exception block set :
blnContinueLoop = false;

In your sql Exception block:
intAllowedRetryAttempts = intAllowedRetryAttempts + 1;

You could also use a delay shape to delay a certain interval between
the next retry.

Matt

"Jeremy Chapman" wrote:

I have an orchestration which calls a web service. The send port is set
to
rety 3 times, once every 1 minute. I've got a scope with a catch around
the
send shape for additional workflow if the web service call fails. My
web
service parses the some text and makes some sql calls. If the sql calls
fail I want the orchestration to continue retrying which is the default
behaviour, but I also have parsing logic in the web service which throws
some custom exception if the data can't be parsed. If these custome
exceptions are thrown, I don't want the orchestration to retry the send
port. Is this possible to do?





.



Relevant Pages

  • Re: Write to IIS/Event Log File ?
    ... >with an exception that might arise, ... >either in the web service, ... >Writting to the event log threw me Security Exceptions, ... NET Framework Class Library: ApplicationActivationAttribute ...
    (microsoft.public.dotnet.general)
  • Re: Problem with Exception Handling using Web Services
    ... private void checkPassword ... The Exception is definitely thrown, but when I run it in a web browser it ... >> Microsoft Visual C#.NET to interact with the web service. ... >> Adrian Burka ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Retry on certain exceptions?
    ... you will end up with the suspended messages. ... custom exception I'll end up with 1 suspended message. ... your orchestration to call the Web Service. ... then add a loop shape. ...
    (microsoft.public.biztalk.general)
  • Re: Smart Device App fails calling simple Web Service...
    ... the device or emulator thinks localhost is itself, ... and not the machine where you are running the web service. ... > I am getting the following exception... ... > that succeeded in the web form app]. ...
    (microsoft.public.dotnet.framework.compactframework)
  • SoapException
    ... An unhandled exception of type ... This is an excerpt from my Web Service (which runs on an ISP and I cannot ... public String PutStaticData ... Since the exception is unhandled, and I have a catch statement for this ...
    (microsoft.public.dotnet.framework.aspnet.webservices)