SOAP 1.2 Request and Response of GetSpeech

This section provides a tutorial example on how to use to send a SOAP 1.1 request for the GetSpeech Web service provided by The response of GetSpeech received looks very nice.

After finishing SOAP 1.1 test, I continued to use to send a SOAP 1.2 request for the GetSpeech Web service.

According to the instructions given at, I prepared by first request sample, soap_1_2_GetSpeech.req:

POST /WSShakespeare.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 416

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi=""
    <GetSpeech xmlns="">
      <Request>Cowards die many times before their deaths</Request>

I carefully counted the number of bytes of the request content including the last \r\n and entered 416 in the Content-Length header line.

Here is the test result of my sample SOAP 1.2 request:

\herong> 80 
   soap_1_2_GetSpeech.req soap_1_2.res

\herong>type soap_1_2.res
HTTP/1.1 200 OK
Connection: close
Date: ... 2009
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 725

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=""
    <GetSpeechResponse xmlns="">
        &lt;SPEECH&gt;&lt;PLAY&gt;JULIUS CAESAR&lt;/PLAY&gt;
        &lt;SPEAKER&gt;CAESAR&lt;/SPEAKER&gt;Cowards die many times
        before their deaths; The valiant never taste of death but 

Very nice again. My first SOAP 1.2 test with worked correctly.

The SOAP response message received as a single line without any line breaks. I reformatted it before inludeding it here.

Last update: 2009.

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

 SOAP RPC Presentation

 SOAP Properties Model

 SOAP Message Exchange Patterns

 SOAP HTTP Binding

 SOAP Perl Implementations

 SOAP PHP Implementations

 SOAP Java Implementations

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

Perl Socket Test Program for HTTP and SOAP - Socket Level Testing Program

 Examples of HTTP 1.0 Requests and Responses

 Examples of HTTP 1.1 Requests and Responses

 SOAP 1.1 Request - Content-Length Too Small

 SOAP 1.1 Request - Content-Length Too Large

 SOAP 1.1 Request and Response of GetSpeech

SOAP 1.2 Request and Response of GetSpeech

 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

 PHP SOAP Extension Client Programs

 PHP SOAP Extension Server Programs

 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

 Web Services and SOAP Terminology


 PDF Printing Version