What Is SOAP?

The World Wide Web Consortium describes the latest version of SOAP as follows:

SOAP version 1.2 provides a simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment using XML. SOAP does not itself define any application semantics such as a programming model or implementation specific semantics; rather it defines a simple mechanism for expressing application semantics

by providing a modular packaging model and mechanisms for encoding application defined data. This allows SOAP to be used for a large variety of purposes ranging from messaging systems to remote procedure call (RPC) invocations. In previous versions of this specification the SOAP name was an acronym. This is no longer the case.

Wow, that sounds as if it were written by a committee; it actually was written by a committee. But we can decipher it into something meaningful to us.

SOAP allows us to create a “SOAP server,” which processes requests and returns the results. It also allows us to create a “SOAP client,” which makes requests and gathers the data a SOAP server returns. This all should sound very familiar at the moment—almost like a Web server and a Web browser. Simply put, however, a SOAP server serves functions, not pages.

What does serving functions mean? Just as you can make calls to specific functions, the same is true of SOAP servers. They contain functions that have been opened so that other programs can access them. These servers can operate over HTTP, SMTP, FTP, and so on.

The great thing about all of this is that SOAP is a standard interface, and as long as you follow the standard specifications for sending and receiving data, the language you use makes no difference! So, if I write a SOAP server in C++, that doesn’t mean I am limited to calling its functions in C++; you can use Perl, Tcl, BASIC, C, or whatever you want to use—as long as you follow the established guidelines.

I’ve provided a very simplistic overview of what SOAP is. SOAP is potentially quite complex. Luckily, the SOAP-Lite Perl module takes care of 99 percent of the details for us; we just have to do a bit of Perl to implement a SOAP client or server.

We are going to cover how to create a simple SOAP server and SOAP client to implement a Web-based catalog system. The catalog system provides a list of products; when a user clicks a product-part number, the system provides detailed information about that product.

Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net