SOAP Communication Example

This section describes an simple example of SOAP communication.

Before going into details of the SOAP specification, let's try a very simple SOAP example. There are 3 basic steps involved in a SOAP communication:

1. Creating a SOAP message. This is easy. Just use any text editor to enter the following SOAP message, hello.msg:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Header>
  <h:control xmlns:h="http://herong.com/header">
   <h:sender>Herong</h:sender>
  </h:control>
 </env:Header>
 <env:Body>
  <b:greeting xmlns:b="http://herong.com/body">
   <b:msg>Hello there!</b:msg>
  </b:greeting>
 </env:Body>
</env:Envelope>

2. Transmitting the message from a SOAP node, my machine, to another SOAP node, your machine. A simple way to do this is for me to send hello.msg to you as an email, so you will get something like this:

From: herong@my.com
To: you@your.com
Subject: Greeting

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Header>
  <h:control xmlns:h="http://herong.com/header">
   <h:sender>Herong</h:sender>
  </h:control>
 </env:Header>
 <env:Body>
  <b:greeting xmlns:b="http://herong.com/body">
   <b:msg>Hello there!</b:msg>
  </b:greeting>
 </env:Body>
</env:Envelope>

3. Processing the message. Once you got my SOAP message, you should be able to read it, and do whatever you want to do with it.

Table of Contents

 About This Book

 Introduction to Web Service

Introduction to SOAP (Simple Object Access Protocol)

 What Is SOAP

SOAP Communication Example

 SOAP Message Structure

 SOAP Message Transmission and Processing

 SOAP Data Model

 SOAP Encoding

 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