SOAP 1.2 Message Styles and Encoding Options

This section describes the SOAP message styles, document vs. rpc, and encoding options, literal vs. encoded. Message style is specified using style='rpc|document' attribute. Message encoding option is specified using use='literal|encoded' attribute.

If you use SOAP 1.2 to exchange messages between the client and the server, you need to decide what message style to use and whether the message is encoded or not.

There are 2 message styles are supported by SOAP 1.2:

Here are rules on how to specify SOAP message style with WSDL 1.1 Binding Extension for SOAP 1.2:

<!-- Message style can be specified at the binding level -->
    <soap12:binding style="rpc|document" .../>

<!-- Message style can be specified at the operating level -->
<!-- Operating level setting overrides the binding level -->
      <soap12:operation style="rpc|document" .../>

<!-- Default is "document" -->

There are 2 message encoding options are supported by SOAP 1.2:

Here is rule on how to specify SOAP message encoding option with WSDL 1.1 Binding Extension for SOAP 1.2:

<!-- Encoding option must be specified for SOAP Body -->
        <soap12:body use="literal|encoded" .../>

<!-- Encoding option must be specified for SOAP Fault -->
        <soap12:fault use="literal|encoded" .../>

<!-- Encoding option must be specified for SOAP Header -->
        <soap12:header use="literal|encoded" .../>

<!-- Encoding option must be specified for SOAP Header Fault -->
        <soap12:headerfault use="literal|encoded" .../>

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

 Using WSDL Document in Java Apache Axis2/Java for WSDL

 Apache Woden for WSDL Documents in Java

 SoapUI - Web Service Testing Tool

 PHP SOAP Extension for WSDL

 Perl SOAP::Lite for WSDL

 Introduction to WSDL 1.1

 WSDL 1.1 Document Structure and Syntax

 WSDL 1.1 Binding Extension for SOAP 1.1

 SoapUI as WSDL 1.1 Testing Tool

 WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles

 PHP SOAP Extension for WSDL 1.1

 Perl SOAP::Lite for WSDL 1.1

 Apache Axis2/Java for WSDL 1.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 Message Styles and Encoding Options

 document/literal Example - Guest Registration

 Request and Response - Guest Registration

 rpc/encoded Example - Get Exchange Rate

 Request and Response - Get Exchange Rate

 SOAP Body and Operation Name - Book Reservation

 Request and Response - Book Reservation

 elementFormDefault="qualified" - Refill Order

 Request and Response - Refill Order

 SOAP 1.2 Binding - PHP, Java and Perl Clients

 Python SOAP Client: Zeep

 WSDL Related Terminologies

 Archived Tutorials

 References

 Full Version in PDF/EPUB