WSDL Tutorials - Herong's Tutorial Examples - Version 2.03, by Dr. Herong Yang
Introduction of Perl SOAP::Lite 0.710 for WSDL
This section describes main steps of using SOAP::Lite 0.710 module to write a Perl script to call a RPC method based Web service by loading its WSDL document.
If you want to write Perl scripts to use WSDL documents, you can use the SOAP::Lite module. On my Windows system, I have ActivePerl 5.8.8 and SOAP::Lite 0.710 installed.
Based on the SOAP::Lite 0.710 manual, here is how you should use an RPC method based WSDL document to make a Web service call in Perl.
1. Import SOAP::Lite module with "use" statement. "+trace" gives your trace output for debugging.
use SOAP::Lite +trace;
2. Create a client object by loading the WSDL document with the service() method. For example:
my $client = SOAP::Lite ->service('http://www.herongyang.com/Service/' . 'GetExchangeRate_WSDL_11_SOAP_11_RPC.wsdl');
3. Call the operation defined in the WSDL as a method, if this is an rpc message style. For example:
$result = $client->GetExchangeRate('USD', 'JPY', '2007-07-07');
4. The result is the returned value. For example:
print "Exchange rate is: $result\n";
To use an XML document based Web service, more steps are required. More details are provided in next tutorials.
Last update: 2009.
Table of Contents
WSDL 2.0 Document Structure and Syntax
WSDL Version 2.0 Part 2: Adjuncts
WSDL 2.0 Document Examples with SOAP Binding
WSDL 20 Programming APIs and Testing Tools
WSDL 1.1 Document Structure and Syntax
WSDL 1.1 Binding Extension for SOAP 1.1
soapUI 3.0.1 - Web Service Testing Tool
WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles
PHP SOAP Extension in PHP 5.3.1
►Using WSDL in Perl with SOAP::Lite 0.710
►Introduction of Perl SOAP::Lite 0.710 for WSDL
Methods on SOAP::Lite 0.710 Client Object
Calling PRC Methods Defined in WSDL 1.1 Documents
service() Method Returns New Objects
SOAP::Data - XML Elements as Data Objects
SOAP::Serializer - Converting Data Objects to XML
Creating a Data Object for a Single XML Element
Creating a Data Object for Nested XML Elements
SOAP::Deserializer - Converting XML to Data Objects
Calling XML Document Based Web Service
Using Operation Name as the SOAP Body Element Name
Using WSDL Document in Java with Axis2 1.4.1
Using WSDL2Java to Generate Web Service Stub Classes
WSDL 1.1 Binding Extension for SOAP 1.2
WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles