Book Image

(MCTS) Microsoft BizTalk Server (70-595) Certification and Assessment Guide: Second Edition

Book Image

(MCTS) Microsoft BizTalk Server (70-595) Certification and Assessment Guide: Second Edition

Overview of this book

Table of Contents (20 chapters)
(MCTS) Microsoft BizTalk Server (70-595) Certification and Assessment Guide Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Handling web exceptions


When BizTalk consumes WCF Services, the opportunity exists for exceptions to be thrown. When this event occurs, we need to catch these exceptions and deal with them gracefully. If we do not handle them properly, we can expect suspended-service instances inside the BizTalk Administration Console.

The scenario that we are about to walk through will demonstrate how BizTalk can handle Typed Exceptions that have been thrown from a Custom WCF Service. The business scenario is that some customers at our car dealership may want to have custom paint applied to their new or used car. The car dealership will leverage an external Autobody shop to perform this work. However, some cars and colors are not valid to have this work done. This service will validate whether the car can have custom paint applied to it. In situations where a desired color has not been passed in, the WCF Service will throw a typed exception called PaintServiceException.

The source code for this demonstration...