Product Details
Programming Web Services with Perl

Programming Web Services with Perl
By Randy Ray, Pavel Kulchenko

List Price: £30.99
Price: £26.34 & eligible for FREE Super Saver Delivery on orders over £5. Details

Availability: Usually dispatched within 24 hours
Dispatched from and sold by Amazon.co.uk

29 new or used available from £17.00

Average customer review:

Product Description

This volume is written for Perl programmers who have no prior knowledge of Web services. No understanding of XML-RPC or SOAP is necessary to be able to apply these technologies easily, through the use of publicly available Perl modules detailed in the book. Given Perl's natural fit for Web applications development, Perl is also a natural choice for Web services development. It's the most popular Web programming language, with strong implementations of both SOAP and XML-RPC, the leading ways to distribute applications using Web services. This book aims to change that, bringing Perl users all the information they need to create Web services using Perl. The book concentrates on what is useful and practical. It introduces the major Web services standards, such as XML-RPC, SOAP, WSDL, and UDDI, and shows how to implement Perl servers and clients using these standards. You'll find detailed references on both the XML and SOAP toolkits, and learn when to use one technology in favour of the other. The book is rich with programming examples that you'll find useful well past the learning stage. And, moving beyond the basics, the book offers solutions to problems of security, authentication, and scalability. Some of the topics covered in the book are: HTTP and XML basics; XML-RPC and the toolkits; SOAP and toolkitsp; SOAP::Lite; using SOAP with SMTP and other protocols; advertising and the REST methodology; and the future of Web services.


Product Details

  • Amazon Sales Rank: #458865 in Books
  • Published on: 2002-12-19
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 496 pages

Editorial Reviews

Review
"Although the book is aimed at Perl programmers interested in Web Serices, some of the protocols are described clearly enough that the book may also be useful for programmers in other languages, such as PHP or C/C++. If you are such a Perl programmer then this book is "Highly Recommended", indeed, almost essential." - Tim Pushman, CVu, June

About the Author
has over 10 years of experience in design and development of complex financial and banking applications, and information management in the financial services sector. Pavel is the author and maintainer of the popular SOAP::Lite module for SOAP clients and servers in Perl, the XMLRPC::Lite module that implements XML-RPC protocol, and the UDDI::Lite module, a client interface for UDDI repositories.

Excerpted from Programming Web Services with Perl by Randy J. Ray, Pavel Kulchenko. Copyright © 2003. Reprinted by permission. All rights reserved.
Chapter 6 - Programming SOAP

There are currently two object-oriented modules for Perl that provide support for developing SOAP client/server applications:SOAP and SOAP::Lite. This chapter introduces these two modules. By comparing and contrasting the modules,you’ll learn their strengths and weaknesses.

The last part of the chapter covers other SOAP-related utility modules,which either augment the client/server SOAP modules or add SOAP-related functionality to other packages and systems. By the time you finish this chapter, you’ll be able to develop basic SOAP applications with the toolkits and utility modules and make an informed choice of software to use in your SOAP projects.

A Toolkit Approach
Using a toolkit for SOAP programming is almost a requirement. The specification itself is very complex, and the XML documents are equally complex. While there is nothing preventing an application developer from coding the functionality directly, there is no reason to with the availability of toolkits for Perl.

A client is concerned with (not always in this order):

•Establishing a communication channel to the server(s)
•Constructing a valid request with the desired data
•Sending the request to the server correctly
•Retrieving and decoding the server response

The goal of a good toolkit is to abstract as much of the encoding and transport issues as possible. There are two toolkits for Perl available from CPAN. Both are discussed here, but the focus will quickly shift to the SOAP::Lite module, which is more actively maintained.

DevelopMentor’s SOAP Module
The first of the modules that will be examined is the modestly named SOAP module from the engineers at DevelopMentor. This module was originally engineering and written by Keith Brown, who worked in close concert with a Java engineer Don Box on a similar toolkit for Java. Their goal was to develop their tools in a side-by-side fashion, which allowed them to focus on both the feature set for the modules and on an interface that was consistent in both languages.

The primary drawback to this module is that it doesn’t appear to be in active maintenance or development. The full SOAP specification isn’t yet implemented in the toolkit, and likewise there is no level of support for the emerging SOAP 1.2 standard. It isn’t clear what future plans there are for the module.

Example: Client to Convert a Number to Words
This script, shown in Example 6-1, connects to a public server that converts integer numbers to their text equivalents. It uses the SOAP toolkit to manage all the abstract elements such as XML encoding, the HTTP transport, and decoding the resulting XML.

The service uses a RPC model for its interface.The service itself is simple:it takes an integer number and returns to the client a string of English text that expresses the value in words. Our client script takes the integer as a command-line argument and prints the string it gets back from the server.

Example 6-1.num2text.
$endpoint ='/scripts/NumToWords.dll/soap/INumToWords';
$soapaction =


Customer Reviews

Disappointing2
I agree with the last reviewer's comments about too much time being spent discussing how clever the interface is. I would much prefer that they presented a toolkit whose interface was straightforward. I don't care if there are multiple, clever ways to do the same thing. It just makes the learning process that much more difficult. Because most of the SOAP-related Perl code they show is using SOAP::Lite, the book has to be judged considering the quality of that module and its documentation. With every previous Perl module I've downloaded from CPAN it has been possible to put something together relatively quickly based on the code provide in the SYNOPSIS section. This was not true with SOAP::Lite. I bought this book expecting it to make up for the poor documentation provided in the PODs for the SOAP::Lite package, but I found it did not help much. Disappointing.

superficial explanation of developing Perl clients2
This book gets off to a good start with a background explanation of SOAP, but then when they get to a description of writing a Perl client, which must be the most common reason for buying the book, it all goes wrong.
There is just one chapter on writing a Perl client.
There are a few short examples, that suffer terribly from 'look how clever the toolkit is' syndrome, with no real explanation of how you tackle writing your own clients from scratch given details of a service. It also assumes you are a reasonably strong Perl programmer, which is probably a drawback from some readers.
Then almost the entire second half of the book is devoted to writing servers, which I wasn't interested in.
Sorry guys, but this book didn't help me out much at all with learning how to write Perl clients for web services.