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:
Even AJAX, in its own way.
The benefit to using services is that they are based on a:
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.)
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 ...