Catching Exceptions
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Catching Exceptions




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Catching Exceptions  
Erik


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-11-06 06:18 PM

Hi all,
I'm facing a problem with catching and handling exceptions in my
orchestration. I' ve an orchestration which consumes web service which may
throw a SoapException in same case. In my orchetration I use a scope for the
web service invocation which cotains the send and the receive of the request
and response. I added a exception handler to the scope which catches
exceptions of type System.Web.Services.Protocols.SoapException. In this Catc
h
Exception block I put an Expression Shape with an expression to log the
exception in the event log and a Terminate Shape to terminate the
orchestration.
If the  consumed Web Service now throws a exception the follwing warnig
comes up:
The adapter failed to transmit message going to send port
"ServiceSelection_1.0.0.0_ServiceSelection.ServiceSelectionProcess_Selection
 ComponentService_RRPort_e215c9eaa435806b
"
with URL
"http://localhost/ApplicationManagementSystem/SelectionComponentService/Sele
ctionComponentService.asmx".
It will be retransmitted after the retry interval specified for this Send
Port. Details:"SoapException: Selection Error: System.Exception: No Service
Found!
at SelectionComponentService.GetBestService(String Interface)
".
Why does the orchestration instance retry the failed wber service request
and why the exception is not catched by the catch block and the process
terminated?
Can anyone help me?

Regards

Erik





[ Post a follow-up to this message ]



    Re: Catching Exceptions  
BA


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 12:18 PM


You should try and return a message describing the error.  You are going
to force SOAP to time out the way you have it set up now, which will cause
the error you have and also cause the calling party to wait (default 2 mins)

You can manage this in 2 ways, add a fault message connector (right click
the port config, select 'add fault message' or something like that) and then
create a SOAP fault message to return.

Second, you can develop a standard error message which mimics the format
you have for your response message, you may have to create a result field
that denotes a success or failure.  In the catch, instead of the terminate,
you can map to the error message format and connect this to the response
shape.

BA
http://biztalkia.blogspot.com


> Hi all,
> I'm facing a problem with catching and handling exceptions in my
> orchestration. I' ve an orchestration which consumes web service which
> may
> throw a SoapException in same case. In my orchetration I use a scope
> for the
> web service invocation which cotains the send and the receive of the
> request
> and response. I added a exception handler to the scope which catches
> exceptions of type System.Web.Services.Protocols.SoapException. In
> this Catch
> Exception block I put an Expression Shape with an expression to log
> the
> exception in the event log and a Terminate Shape to terminate the
> orchestration.
> If the  consumed Web Service now throws a exception the follwing
> warnig
> comes up:
> The adapter failed to transmit message going to send port
> "ServiceSelection_1.0.0.0_ServiceSelection.ServiceSelectionProcess_Sel
>  ectionComponentService_RRPort_e215c9eaa4
35806b"
> with URL
> "http://localhost/ApplicationManagementSystem/SelectionComponentServic
> e/SelectionComponentService.asmx".
> It will be retransmitted after the retry interval specified for this
> Send
> Port. Details:"SoapException: Selection Error: System.Exception: No
> Service
> Found!
> at SelectionComponentService.GetBestService(String Interface)
> ".
> Why does the orchestration instance retry the failed wber service
> request
> and why the exception is not catched by the catch block and the
> process
> terminated?
> Can anyone help me?
> Regards
>
> Erik
>







[ Post a follow-up to this message ]



    Re: Catching Exceptions  
Erik


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 06:18 PM

Hi,

first of all thanks for your response. I'm interessted in trying the seconfd
slution you mentioned, but I don't understand it really.
Here' what I think to have understood:
My Web Service throws a soap exception which is catched by the catch block
of the scope where I invoke the service. Instead of terminating I map e erro
r
message to the response message.
How do I connect the errormessage to the response shape?
Why this solution does not do a retry of service invocation and my (false)
solution does?

Thanks and regards

Erik


"BA" wrote:

>
> You should try and return a message describing the error.  You are going
> to force SOAP to time out the way you have it set up now, which will cause
> the error you have and also cause the calling party to wait (default 2 min
s)
>
> You can manage this in 2 ways, add a fault message connector (right click
> the port config, select 'add fault message' or something like that) and th
en
> create a SOAP fault message to return.
>
> Second, you can develop a standard error message which mimics the format
> you have for your response message, you may have to create a result field
> that denotes a success or failure.  In the catch, instead of the terminate
,
> you can map to the error message format and connect this to the response
> shape.
>
> BA
> http://biztalkia.blogspot.com
>
> 
>
>
>





[ Post a follow-up to this message ]



    Re: Catching Exceptions  
BA


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 12:22 PM


Erik,

You can connect it to the response connector of the port the same way you
would a normal response.  Therefore, you'll have 2 messages that connect
to the response message, one is normal, the other is the error.

One thing to note, your receive message and send message shapes must be outs
ide
the scope block or it wont compile.  Only the error message response should
be in the catch block along with whatever other shapes you may need.


BA
http://biztalkia.blogspot.com
[vbcol=seagreen]
> Hi,
>
> first of all thanks for your response. I'm interessted in trying the
> seconfd
> slution you mentioned, but I don't understand it really.
> Here' what I think to have understood:
> My Web Service throws a soap exception which is catched by the catch
> block
> of the scope where I invoke the service. Instead of terminating I map
> e error
> message to the response message.
> How do I connect the errormessage to the response shape?
> Why this solution does not do a retry of service invocation and my
> (false)
> solution does?
> Thanks and regards
>
> Erik
>
> "BA" wrote:
> 







[ Post a follow-up to this message ]



    RE: Catching Exceptions  
Sujesh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-14-06 06:19 AM

If your make the retry count of your send port to 0, your exception will get
caught.

"Erik" wrote:

> Hi all,
> I'm facing a problem with catching and handling exceptions in my
> orchestration. I' ve an orchestration which consumes web service which may
> throw a SoapException in same case. In my orchetration I use a scope for t
he
> web service invocation which cotains the send and the receive of the reque
st
> and response. I added a exception handler to the scope which catches
> exceptions of type System.Web.Services.Protocols.SoapException. In this Ca
tch
> Exception block I put an Expression Shape with an expression to log the
> exception in the event log and a Terminate Shape to terminate the
> orchestration.
> If the  consumed Web Service now throws a exception the follwing warnig
> comes up:
> The adapter failed to transmit message going to send port
> "ServiceSelection_1.0.0.0_ServiceSelection.ServiceSelectionProcess_Selecti
 onComponentService_RRPort_e215c9eaa43580
6b"
> with URL
> "http://localhost/ApplicationManagementSystem/SelectionComponentService/Se
lectionComponentService.asmx".
> It will be retransmitted after the retry interval specified for this Send
> Port. Details:"SoapException: Selection Error: System.Exception: No Servic
e
> Found!
>    at SelectionComponentService.GetBestService(String Interface)
>  ".
> Why does the orchestration instance retry the failed wber service request
> and why the exception is not catched by the catch block and the process
> terminated?
> Can anyone help me?
>
> Regards
>
> Erik





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:10 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register