A SOAP message is no more and no less than an XML document, sent via
some sort of transport protocol. If your XML is rusty, you better brush
up now, with Jay's
XML tutorial. (You can skip the DTD section if you're in a hurry to
quote the W3C specification, "a SOAP message MUST NOT contain a Document
Type Declaration." That's to reduce the load on a SOAP server, but
conveniently it also reduces the load on the SOAP programmer.) HTTP is
the most common way of sending SOAP messages, although SOAP is flexible
enough to work with pretty much any transmission protocol you like.
In this tutorial, we're going to use SOAP::Lite, a set of Perl modules
that makes dealing with SOAP a breeze. If you happen to dislike Perl,
there are plenty of other implementations: Apache SOAP, which runs in Java,
Microsoft
.NET SOAP, if you like Visual Basic or C#, or any of a hudred more. Or
write your own. But here, today, we are using Perl.
So download and install SOAP::Lite. You can get SOAP::Lite from the developer's site, soaplite.com, or use CPAN to
grab it automatically and take care of any dependency issues. You'll want to put it on your Web
server as well as on the machine you're going to write a client
application on. To install
it from a command line, you can type ...
perl -MCPAN -e
... which will give you a CPAN shell, then ...
install SOAP::Lite
Follow the prompts, and soon enough you're all lathered up and ready to
go.
SOAP::Lite requires MD5, XML::Parser, MIME::Lite, and MIME::Parser,
which you probably have already if you have a relatively modern working
Perl install. If not, CPAN's got 'em.
I'll wait here, blowing bubbles, until you've done that.
next page»