BizTalk Server Orchestration - Handling errors in Orchestrations from invoked WebServices

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > October 2005 > Handling errors in Orchestrations from invoked WebServices





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Handling errors in Orchestrations from invoked WebServices
BizSolutions

2005-10-06, 5:57 pm

Hi,

I have a simple orchestration, that is calling a web service and that web
service is throwing division by zero exception hard coded. I have a scope
and exception handling block which is catching
System.Web.Services.Protocols.SoapException type of exception. My
orchestration is unable to catch SOAP exception in exception block. I am
writing the exception in the event log, below is the code in expression
shape.

Expression Shape Code: System.Diagnostics.EventLog.WriteEntry("Exception
Detail ",ex.ToString());
URL: http://www.winterdom.com/weblog/archives/000486.html

I have debugged the orchestration but exception block never got executed.
How can I fix this issue. Retry count for the send port is also zero but no
success. although BizTalk is listing the following warnings in event log.

1. The adapter "SOAP" raised an error message. Details "Exception has been
thrown by the target of an invocation.".

2. The adapter "SOAP" raised an error message. Details
"System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.DivideByZeroException: Attempted to divide by zero.
at CatchSoapException.TstSoapException.RunTest(Int32 NoOfNodes, Int32
Devider) in c:\egw.rra\catchsoapexception\tstsoapexception.asmx.cs:line 65
--- End of inner exception stack trace ---".

3. The adapter failed to transmit message going to send port
"http://localhost:82/CatchSoapException/TstSoapException.asmx". It will be
retransmitted after the retry interval specified for this Send Port.
Details:"System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.DivideByZeroException: Attempted to divide by
zero.
at CatchSoapException.TstSoapException.RunTest(Int32 NoOfNodes, Int32
Devider) in c:\egw.rra\catchsoapexception\tstsoapexception.asmx.cs:line 65
--- End of inner exception stack trace ---".

Is there any sample available for download other then SampeNack, which
really works with Web Service in solicit mode.


Regards,
BizSolutions



Stephen W. Thomas

2005-10-07, 2:50 am

Hello.

I have not worked with catching web service errors that much.

Have you tried catching just a System.Exception to see if the logic is hit?
Or, it’s possible the SOAP exception is returned as a NAck via a Delivery
Exception.

Hope this helps.

Stephen W. Thomas
http://www.biztalkgurus.com
http://www.biztalkblogs.com


"BizSolutions" wrote:

> Hi,
>
> I have a simple orchestration, that is calling a web service and that web
> service is throwing division by zero exception hard coded. I have a scope
> and exception handling block which is catching
> System.Web.Services.Protocols.SoapException type of exception. My
> orchestration is unable to catch SOAP exception in exception block. I am
> writing the exception in the event log, below is the code in expression
> shape.
>
> Expression Shape Code: System.Diagnostics.EventLog.WriteEntry("Exception
> Detail ",ex.ToString());
> URL: http://www.winterdom.com/weblog/archives/000486.html
>
> I have debugged the orchestration but exception block never got executed.
> How can I fix this issue. Retry count for the send port is also zero but no
> success. although BizTalk is listing the following warnings in event log.
>
> 1. The adapter "SOAP" raised an error message. Details "Exception has been
> thrown by the target of an invocation.".
>
> 2. The adapter "SOAP" raised an error message. Details
> "System.Web.Services.Protocols.SoapException: Server was unable to process
> request. ---> System.DivideByZeroException: Attempted to divide by zero.
> at CatchSoapException.TstSoapException.RunTest(Int32 NoOfNodes, Int32
> Devider) in c:\egw.rra\catchsoapexception\tstsoapexception.asmx.cs:line 65
> --- End of inner exception stack trace ---".
>
> 3. The adapter failed to transmit message going to send port
> "http://localhost:82/CatchSoapException/TstSoapException.asmx". It will be
> retransmitted after the retry interval specified for this Send Port.
> Details:"System.Web.Services.Protocols.SoapException: Server was unable to
> process request. ---> System.DivideByZeroException: Attempted to divide by
> zero.
> at CatchSoapException.TstSoapException.RunTest(Int32 NoOfNodes, Int32
> Devider) in c:\egw.rra\catchsoapexception\tstsoapexception.asmx.cs:line 65
> --- End of inner exception stack trace ---".
>
> Is there any sample available for download other then SampeNack, which
> really works with Web Service in solicit mode.
>
>
> Regards,
> BizSolutions
>
>
>
>

Tomas Restrepo \(MVP\)

2005-10-07, 7:48 am

> I have a simple orchestration, that is calling a web service and that web
> service is throwing division by zero exception hard coded. I have a scope
> and exception handling block which is catching
> System.Web.Services.Protocols.SoapException type of exception. My
> orchestration is unable to catch SOAP exception in exception block. I am
> writing the exception in the event log, below is the code in expression
> shape.


This has worked well for me:
http://www.winterdom.com/weblog/archives/000486.html


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/<


trinath

2005-10-07, 8:47 pm

Futher to this: if you set "Delivery Notification" property of the Port to
"Transmitted" and add an extra exception handler to your scope to handle
DeliveryFailureException, you will able to catch errors when the destination
system is down.

Rgds,
Tim
Vijen

2005-10-08, 5:53 pm

1) mark your send port with Delivery Notification = Transmitted,
2) put it in a synchronized scope,
3) Use a catch block to catch the exception and then typecast it to
System.Web.Services.Protocols.SoapException
You can get the details of your exception.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com