Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By : Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper
Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By: Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper

Overview of this book

Table of Contents (21 chapters)
SOA Patterns with BizTalk Server 2013 and Microsoft Azure Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using asynchronous services in WCF


WCF has support for both client-side and server-side asynchronous programming scenarios. By client-side programming, I mean that a service built with a request/response operation can appear asynchronous to the client. For example, let's look at a simple sequence diagram that shows what I mean:

The WCF client proxy class is responsible for simulating the asynchronous communication, while the actual service still exposes only a synchronous operation. Let's look at an example of how we can physically create a client-side asynchronous experience in a WCF solution.

Creating the synchronous service

We start out by creating a new, empty Visual Studio 2012 solution. Then, we add a project of type WCF service library to the solution. This project type automatically adds an interface class, service class, and an application configuration file. I changed the interface class content so that it reflects the adverse event object that we will work with throughout this chapter...