Using SOAP Encoding in SOAP Messages

This section describes an example on how SOAP Encoding can be used in SOAP messages.

SOAP encoding can be used in SOAP header blocks and SOAP bodies by specifying the SOAP "encodingStyle" attribute as encodingStyle="http://www.w3.org/2003/05/soap-encoding". Here is a SOAP message example with SOAP encoding:

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Header 
    env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
    xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <h:expense xmlns:h="https://www.herongyang.com"
     env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
     env:mustUnderstand="true">
  </h:expense>
 </env:Header>

 <env:Body 
    env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
    xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <b:travel enc:nodeType="struct" xmlns:b="https://www.herongyang.com">
   <b:currency enc:id="euro">
    <b:rate>0.72</b:rate>
   </b:currency>
   <b:flight>429.00</b:flight>
  </b:travel>
  <b:shopping enc:nodeType="struct" xmlns:b="https://www.herongyang.com">
   <b:currency enc:ref="#euro"/>
   <b:paris enc:nodeType="array" enc:arraySize="3"
      enc:itemType="xsi:float">
    <b:item>29.00</b:item>
    <b:item>99.00</b:item>
    <b:item>19.00</b:item>
   </b:paris>
  </b:shopping>
 </env:Body>
</env:Envelope>

Table of Contents

 About This Book

 Introduction to Web Service

 Introduction to SOAP (Simple Object Access Protocol)

 SOAP Message Structure

 SOAP Message Transmission and Processing

 SOAP Data Model

SOAP Encoding

 What Is SOAP Encoding

 Multiple References and Circular References

 Node Types - simple, struct, array

 SOAP Encoding Attributes and Namespace

Using SOAP Encoding in SOAP Messages

 SOAP RPC Presentation

 SOAP Properties Model

 SOAP MEP (Message Exchange Patterns)

 SOAP HTTP Binding

 SOAP PHP Implementations

 PHP SOAP Extension Client Programs

 PHP SOAP Extension Server Programs

 PHP SOAP Web Service Example - getTemp

 SOAP Perl Implementations

 Perl SOAP::Lite - SOAP Server-Client Communication Module

 Perl Socket Test Program for HTTP and SOAP

 Perl SOAP::Lite for NumberToWords SOAP 1.1 Web Service

 Perl SOAP::Lite for SOAP 1.2 Web Services

 Perl SOAP::Lite for WSDL

 Python SOAP Client: Zeep

 SOAP Java Implementations

 Java Socket and HttpURLConnection for SOAP

 SAAJ - SOAP with Attachments API for Java

 SoapUI - SOAP Web Service Testing Tool

 WS-Security - SOAP Message Security Extension

 WS-Security X.509 Certificate Token

 Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service

 Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services

 Perl SOAP::Lite 0.710 for WSDL

 Web Services and SOAP Terminology

 Archived Tutorials

 References

 Full Version in PDF/EPUB