BizTalk2013R2 WebHTTP adapter fault message handling

Hi,

I wanted to use the WCF-WebHTTP adapter in BizTalk 2013R2 for synchronously receive message from the REST-API service. But I came to know from this link that , we need to handle fault exception with the custom binding/behaviour in BizTalk 2010.

My ask is, In BizTalk2013R2 Will this fault handling, should be achieved still through custom behaviour, or BizTalk 2013 R2 has a inbuilt fix for this?

Please suggests views/Links for this scenar

August 20th, 2015 8:55am

Hi Vignesh,

There is nothing special about "RESTful" exceptions.  You can handle them just like any other Exception type using a Catch Block in a Scope.

The steps in the above article merely surface the specific protocol error. Which IMO, you still need to do using custom way.

Free Windows Admin Tool Kit Click here and download it now
August 20th, 2015 9:22am

Hi Vignesh,

The link shared above deals with catching protocol exception  .The generic exception handling  mechanism will remain same . For example if you want to capture System.Exception in catch block you need to create object of the type of the exception(like System.Exception). You can have multiple catch block to deal with different type of exception which you want to capture .

If your requirement is to capture protocol exception then you can use above link shared  to construct protocol exception message and route it to the desired process .

Thanks

Abhishek

August 20th, 2015 10:04am

Thanks for the responses,

I need to handle the Protocol exceptions(Non 200 http codes), so that the messages gets suspended in BizTalk for resumption.

In my scenario,

Trail1: I have a two way send port(without orchestration), to send message to REST API service. Any error/exceptions thrown by the service is returning as an xml message(not as exception faults), hence it is not getting suspended in BizTalk(will not get into catch block as well).

Trial2: If I use a one way send port, adapter shows it as successfully delivered despite of an error/exception.

My requirement is to handle this exception(to read the error status code) and suspend the message in BizTalk.

I suppose, the Custom behaviour will help me in catching those exceptions and push that as a suspended message, but I am lacking with the right article which can help me with .

As this is the first time I am working on behaviors, Please suggest your views / links or any ideas which can feed this requirement.

Thanks

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 9:19am

Do this simple and easy. Why dont you just get the response in ur orch and see if the response is what you expect i.e a schema type or a xml with specific local name. If not then in else of decide do what ever you what it.

August 21st, 2015 10:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics