Calling PRC Methods Defined in WSDL 1.1 Documents

This section provides a tutorial example on how to call an RPC method defined a WSDL 1.1 document with SOAP 1.1 binding.

I think I am ready to write my first SOAP::Lite 0.710 client program to call my RPC method based Web service defined in the WSDL document, GetExchangeRate_WSDL_11_SOAP_11_RPC.wsdl. Here is an example Perl program,

#- Copyright (c) 2009 by Dr. Herong Yang,
#- All rights reserved
   use SOAP::Lite +trace;

#- Loading the WSDL document
   my $client = SOAP::Lite->service(

#- Making the SOAP message in a readable format

#- Calling the RPC
   $result = $client->GetExchangeRate('USD', 'JPY', '2007-07-07');
#- Showing the result
   print "Exchange rate is: $result\n";

Notes on

Here is the execution result of

SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: GetExchangeRate SOAP::Data=HASH(0x1e2e...
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x...
   POST HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 748
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<datePart xsi:type="xsd:date">USD</datePart>
<fromCurrencyPart xsi:type="xsd:string">JPY</fromCurrencyPart>
<toCurrencyPart xsi:type="xsd:string">2007-07-07</toCurrencyPart>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0...
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: ...
Server: Apache
Content-Type: text/xml
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
X-Powered-By: PHP/4.4.9

      <ratePart xsi:type="xsd:decimal">123.14</ratePart>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()

Exchange rate is: 123.14

The result is good and bad:

Conclusion, SOAP::Lite 0.710 does not support the parts="..." of the "soap:body" WSDL statement.

Last update: 2009.

Table of Contents

 About This Book

 Introduction to WSDL 2.0

 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

 Introduction to WSDL 1.1

 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

 SOAP 1.2 Binding - PHP, Java and Perl Clients

 WSDL Related Terminologies


 PDF Printing Version