Quantcast
Channel: BizTalk Server General Forum
Viewing all articles
Browse latest Browse all 872

Consume RESTFul Web Service and Handle Errors

$
0
0

Hi, I was asked a question by a colleague and it still has me stumpted. I've been reading around and using samples and I'm successfully consuming a RESTful Service (mainly using the BLogical behavior).  The happy path works great but .. there are those pesky errors :-(  RESTful services use HTTP errors to report business problems, particularly in 400-499 range which are allocated for this purpose. What is needed is to intercept these and convert them to something more useable.  BizTalk picks them up and they come as unexpected exception accompanied with NACK message, but in fact nothing is wrong.

I've been unable to force them into Fault handler on the Port.

I've been unable to pick up an exception that shows all information the reporting service provided.

No problem I thought; I will just capture them in the Behavior, however that failed as well - it seems somewhere along the BizTalk/Wcf stack a decision has been made that this is a technical error and the Behavior does not get called (after the Http error is raised  by the service).

Has anyone solved this problem?  or found a way to intercept the HTTP Response before anything else does?

thanks in advance

mark


mark


Viewing all articles
Browse latest Browse all 872

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>