Skip to Main Content
Perl in a Nutshell, 2nd Edition
book

Perl in a Nutshell, 2nd Edition

by Nathan Patwardhan, Ellen Siever, Stephen Spainhour
June 2002
Beginner content levelBeginner
759 pages
80h 42m
English
O'Reilly Media, Inc.
Content preview from Perl in a Nutshell, 2nd Edition

SOAP::Lite

You can try an implementation of SOAP with Perl called SOAP::Lite, written by Paul Kulchenko. SOAP::Lite is a collection of Perl modules that provide a simple and lightweight interface for both the client and server side. This version of SOAP::Lite supports the SOAP 1.1 specification (http://www.w3.org/TR/SOAP) and works with many SOAP implementions, including Apache SOAP, Frontier, Microsoft SOAP, Microsoft .NET, DevelopMentor, XMethods, 4s4c, Phalanx, Kafka, SQLData, Lucin (in Java), Perl, C++, Python, VB, COM, and XSLT.

Here’s an example that uses SOAP::Lite. The following code creates a SOAP::Lite object and uses it, but what’s special about the SOAP::Lite object is that it’s based on code that lives on www.soaplite.com. In other words, the code that lives on the remote end of the connection might not be Perl at all—but by using SOAP::Lite, you can execute the f2c( ) function as if you were calling f2c( ) from your own Perl program.

Also note the uri and proxy options. The uri option is the URI for SOAP methods. Basically, uri tells SOAP::Lite where SOAP-related content lives. In Perl terms, uri can represent the class in which you’ll find the function to execute. For example, let’s say you have the following SOAP server that uses HTTP as its transport mechanism:

#!/usr/local/bin/perl -w

use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI
    -> dispatch_to('Hello::(?:hello)')
    -> handle
    ;

This example has two key parts: it will look for a module named “Hello” and will ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl by Example, Fourth Edition

Perl by Example, Fourth Edition

Ellie Quigley
Perl Cookbook, 2nd Edition

Perl Cookbook, 2nd Edition

Tom Christiansen, Nathan Torkington
Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix

Publisher Resources

ISBN: 0596002416Errata Page