CHAPTER 1 ■ WCF AND SOA BASICS
11
■Note Simply put, SOAP is a lightweight communication protocol for web services based on XML. It is used to
exchange structured and typed information between systems. SOAP allows you to invoke methods on remote
machines without knowing specific details of the platform or software running on those machines. XML is used to
represent the data, while the data is structured according to the SOAP schema. The only thing both the consumer
and provider need to agree on is this common schema, defined by SOAP. Overall, SOAP keeps things as simple as
possible and provides minimum functionality. SOAP used to stand for “Simple Object Access Protocol,” but the
W3C dropped that name when the focus shifted from object access to object interoperability via a generalized XML
messaging format as part of SOAP 1.2.
XML web services are designed with interoperability in mind, and are easily callable from non-
Windows platforms. It is common to confuse web services with .NET Remoting. Web services and .NET
Remoting are related, but web services have a more simplified programming model than .NET
Remoting. In other words, .NET Remoting and web services look similar from a high-level architecture
level, but they differ in the way they work. For example, they both have different ways of serializing data
into messages. .NET Remoting supports RPC-based communication by default, and web services
support message-based communication by default. Web services rely on XML Schema for data types,
and .NET Remoting relies on the CLR. You can use .NET Remoting to build web services, but the WSDL
generated by .NET Remoting is not widely adopted and might be ignored by some clients. Though you
can use either for creating components, .NET Remoting is suitable for creating components to be used
by your own application running in the .NET environment, and XML web services create components
that can be accessible to any application connected via the Internet.
Through web services, Microsoft wants to achieve the best of both worlds—web development and
component-based development. Web services were the first step toward service orientation, which is a
set of guiding principles for developing loosely coupled distributed applications. SOA is a vision of
services that have well-defined interfaces. These loosely coupled interfaces communicate through
messages described by the XML Schema Definition (XSD) and through the message patterns described
by WSDL. This provides for a great base architecture for building distributed applications. Since a web
service and its clients are independent of each other, they need to adhere only to the XSD and WSDL
document standards in order to communicate.
The next Microsoft offering to address SOA is WCF. We’ll now discuss how WCF complements web
services and enhances their value.
What Does WCF Solve?
WCF is not just another way of creating a distributed solution—it also provides a number of benefits
compared to its predecessors. If you look at the background of WCF, you’ll find that work on WCF
started with the release of .NET. Microsoft unveiled this technology at the 2003 Microsoft Product
Developers Conference in Los Angeles, California. In other words, it has taken years to build and come
to market. WCF addresses lots of issues; Figure 1–2 shows the three main design goals of WCF.