O'Reilly logo

C# 2010 All-in-One For Dummies® by Stephen R. Davis, Charles Sphar, Bill Sempf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Building Web Services with ASMX

In This Chapter

  • Getting acquainted with SOAP

  • Creating an ASMX service

  • Running an ASMX service

  • Building the SHARP code

In Chapter 1 I state that services provide access to functional code over the wire. Though it wasn't covered, it probably became obvious that one just can't call a method on a remote machine without some kind of wrapper. The black magic that makes .NET methods work in a client program don't work over the Internet.

There have been a bunch of remote procedure call (as it is called) protocols over the years. Some you might be familiar with include:

  • CORBA

  • DCOM

  • RCW

  • OpenBinder

  • LINX

  • DLPI

  • STREAMS

  • DDE

  • Even AJAX, in its own way.

The benefit to using services is that they are based on a:

  • standard

  • human readable

  • extendable

  • protocol

None of the other messaging protocols are all of those. They all have some small (or occasionally large) problem that prevents the benefits of remote procedure access to really shine. Web services provide what is actually needed. The second Web service protocol to provide these benefits in usable form is SOAP. (ReST is the first, but that is a story for a later chapter.)

Getting to Know SOAP

Simple Object Access Protocol or SOAP is an XML-based protocol for sending messages over the Internet, usually via HTTP. You can think of it as an envelope for remote procedure calls because that is exactly what it is.

The major benefit to SOAP, aside for its rather global acceptance and its longevity, is the rich experience that it provides ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required