WCF-WebHttp BizTalk 2013 - how to catch HTTP 400 response

Hi,

I did not find any specific solution to handle Restful exceptions in Biztalk 2013 and using WCF-WebHttp to consume service.

Can anyone suggest me how to handle exceptions in the orchestration?



July 21st, 2015 4:57am

Hi,

Hope below TechNet Wiki helps for capturing error in rest service .

http://social.technet.microsoft.com/wiki/contents/articles/16625.biztalk-server-rest-services-error-handling.aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 5:25am

Is it applicable to Biztalk 2013 and dont have any standard way to handle with wcf-webhttp adapter?
July 21st, 2015 5:42am

Hi,

Yes, XlangSoapException behavior is same with BizTalk 2010 and BizTalk 2013 . You can apply similar behaviour to capture protocol exception inside your Orchestration .

Thanks
Abhishek

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 6:09am

Thanks Abhishek for your quick response.

Is this "WebRequestInterceptor" need to be applied under WCF-webHttp Behavior tab.

Sorry I am not sure can you please suggest me?

July 21st, 2015 7:10am

It's important to point out that 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.

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 7:54am

Yes , I do agree with Boatseller . You can capture your Exception  by having a try -catch block and defining the exception message type .

Now as your question points to capturing protocol exception(how to catch HTTP 400) you can use the link mentioned above .

Thanks
Abhishek

July 21st, 2015 8:08am

Yes, I want to capture protocol exception and exception message. I will try above suggestions and will get back if i have any issues. 

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 8:55am

Well, the protocol exception wasn't part of the original question and in practice, is only marginally useful.

I would get the exception handling working first, then worry about such specifics.

July 21st, 2015 10:04am

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

Other recent topics Other recent topics