Herong's Tutorial Notes on Web Service and SOAP
Dr. Herong Yang, Version 4.00

Installing SOAP::Lite 0.710 to Support SOAP 1.2

This section provides a tutorial example on how to install SOAP::Lite 0.710.08 on Windows system using Perl Package Manager. SOAP::Lite 0.710 supports SOAP 1.2 with soapversion('1.2') function.

After finishing testing with SOAP 1.1, I want to try SOAP 1.2 with SOAP::Lite for the same GetSpeech Web service provided by xmlme.com.

The first thing is to verify my SOAP::Lite version and make sure it supports SOAP 1.2.

1. Checking my Perl version:

\herong>perl -version

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 50 registered patches, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

Binary build 820 [274739] provided by ActiveState 
http://www.ActiveState.com
Built Jan 23 2007 15:57:46

2. Looking at SOAP::Lite manual at C:\local\Perl\html\lib\SOAP\Lite.html. It does not mentioning SOAP 1.2:

SOAP::Lite - Client and server side SOAP implementation
...

DESCRIPTION

SOAP::Lite is a collection of Perl modules which provides a simple 
and lightweight interface to the Simple Object Access Protocol (SOAP) 
both on client and server side.

This version of SOAP::Lite supports the SOAP 1.1 specification 
( http://www.w3.org/TR/SOAP ).

The main features of the library are:
    *      Supports SOAP 1.1 spec.
...

3. May be there is a new version of SOAP::Lite that will support SOAP 1.2. Let me check the current version of SOAP::Lite on my machine with the "\local\perl\bin\ppm" command. The "Perl Package Manager" GUI shows up:
SOAP::Lite 0.710 Upgrade

4. PPM tells me that I am using SOAP::Lite 0.55-r1 and SOAP::Lite 0.710.08 is available. So I click Action > Install SOAP-Lite 0.710.08. PPM gives this warning: "Installing SOAP-Lite-0.710.08 would downgrade SOAP::Transport::HTTP from version 0.55 to 0, SOAP::Transport::TCP from 0.55 to 0, XMLRPC::Transport::TCP from 0.55 to 0".

5. PPM also gives me a list of other modules that SOAP::Lite depends on. They are: MIME::tools, version, FCGI, MIME::Lite, IO-stringy, MailTools, File::Temp, Email-Date-Format, MIME-Type, TimeDate, Test-Pod, Pod-Simple, Pod-Escape. These modules will be installed or upgraded if I upgrade SOAP::Lite to 0.710.08.

6. I click File > Run Marked Actions and click OK to accept 13 additional prerequisite packages listed above. After a few minutes, SOAP::Lite 0.710.08 and other packages are installed.

7. Looking at SOAP::Lite manual again at C:\local\Perl\html\site\lib\SOAP\Lite.html It does have a new function that allows you use SOAP 1.2:

soapversion(optional value)

   $client->soapversion('1.2');

   If no parameter is given, returns the current version of SOAP that
   is being used by the client object to encode requests. If a 
   parameter is given, the method attempts to set that as the version
   of SOAP being used.

   The value should be either 1.1 or 1.2.

Looks like I have the right version of SOAP::Lite to do SOAP 1.2 programming.

Last update: 2009.

Sections in This Chapter

Installing SOAP::Lite 0.710 to Support SOAP 1.2

Features in SOAP::Lite 0.710

Methods on SOAP::Lite 0.710 Client Object

Testing SOAP::Lite Client Objects

Request Differences between SOAP 1.1 and SOAP 1.2

GetSpeech_localhost.pl - Testing GetSpeech on Local Host

soapversion('1.2') and envprefix('soap12') Must Used Together

default_ns() - Setting Default namespace for Body Elements

SOAP::Data - Utility Class to Generate XML Elements

SOAPAction - Not Needed, But No Way to Remove It

Unsupported Media Type: "application/soap"

DEFAULT_HTTP_CONTENT_TYPE='application/soap+xml'

content_type() method in the HTTP::Headers Class

GetSpeech_SOAP_1_2.pl - SOAP::Lite for SOAP 1.2 Web Service

Dr. Herong Yang, updated in 2009
Installing SOAP::Lite 0.710 to Support SOAP 1.2