SOAP::Data - XML Elements as Data Objects

This section describes SOAP::Data class - Representing XML elements as data objects. Methods supported in SOAP::Data to help creating and XML elements are also listed.

In order to call an XML document based Web service, we need to use another class provided in the SOAP::Lite 0.710 module: SOAP::Data to build XML documents.

Here is the description of SOAP::Data from the SOAP::Lite manual:

The SOAP::Data class provides the means by which to explicitly 
manipulate and control all aspects of the way in which Perl data gets
expressed as SOAP data entities. Most of the methods are accessors, 
which like those in SOAP::Lite are designed to return the current 
value if no new one is passed, while returning the object reference 
otherwise (allowing for chained method calls). Note that most 
accessors (except value) accept a new value for the data object as a 
second argument.

But based on my understanding, a better description should be:

The SOAP::Data class provides data objects that represents XML elements to be used 
as SOAP Header elements or SOAP Body elements.

Methods provided by SOAP::Data are:

For example, if you want to create a SOAP::Data object to represent the following XML element:

    <HelloRequest>Hello from client.</HelloRequest>

You can use this sample Perl code:

   $element = SOAP::Data->new();
   $element->value('Hello from client.');

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