| Dynamically generated HTML content works fine in Web browsers, but it presents a nightmare for anyone trying to utilize that data with other programs. For example, you can easily view an auction site in a browser, but an application would require a complex HTML parser to read your bid's status from the same site. Worse, you would need a different parser to track a different auction site, and the simplest redesign of either site could throw off your program. Web services solve this problem with a consistent and easy method for accessing online information. As more online services are offered, new applications can be built to interact directly with them. For example, that Web-based auction site could let you write software that automatically updates your bids based on the status of a bid on a different auction site. Or you could edit your Web log with your favorite word processor once the site and application were both speaking the same language. Web services could potentially create a whole new type of Web. A protocol created by Microsoft, DevelopMentor, and Userland Software and backed by companies that include IBM, Lotus, and Compaq gives a big push toward that vision. Simple Object Access Protocol (SOAP) exchanges application data over HTTP in XML encoding. Because HTTP is ubiquitous and XML parsers are widely available, SOAP can be easily adopted and quickly developed. The trade-off is speed; SOAP won't replace lower-level technologies, but it works where interoperability is paramount. SOAP toolkits are already available for most popular development environments, including Python, Java, Visual Basic, and, of course, Perl. Programmers experienced with remote procedure call APIs such as Java's RMI or Microsoft's COM+ will find the SOAP toolkits familiar. In this article, we'll look at how to use Perl to both provide Web services and to build applications on top of SOAP servers. Because Perl is available on many platforms, Perl-based SOAP services are an easy way to tie diverse computing environments together by using a common high-level format. Soon you'll be exploiting this powerful new technology in ways that you never imagined. |