SOAP Web Service Tutorials - Herong's Tutorial Examples

http://www.herongyang.com/Web-Services

Copyright © 2002-2018 by Dr. Herong Yang. All rights reserved.

SOAP Web Service Tutorials This book is a collection of notes and sample codes written by the author while he was learning SOAP Web service. Topics include introduction of SOAP specifications; SOAP modules, features, and message structure; SOAP Message Exchange Patterns; Perl, PHP, and Java support of SOAP Web services; WS-Security, Username Token and X.509 Token; Signing and Encrypting SOAP messages; Using SoapUI for Web service testing.

Table of Contents

About This Book

Introduction to Web Service

What Is a Web Service

Web Service Related Technologies

Introduction to SOAP (Simple Object Access Protocol)

What Is SOAP

SOAP Communication Example

SOAP Message Structure

SOAP Generic Message Structure

SOAP Fault Message Structure

SOAP Message Transmission and Processing

SOAP Protocol Binding

SOAP Distributed Processing Model

SOAP Features and Modules

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

What Is SOAP RPC Presentation

Using Web Methods to Invoke RPC

Using SOAP Messages to Invoke RPC

RPC Response Messages

SOAP Properties Model

SOAP MEP (Message Exchange Patterns)

What Are SOAP Message Exchange Patterns

Request-Response Message Exchange Pattern

Response Message Exchange Pattern

Web Method Feature

SOAP Action Feature

SOAP HTTP Binding

SOAP PHP Implementations

SOAP PHP Implementations: PEAR::Package::SOAP and NuSOAP

PHP 7.0.2 by The PHP Group

What Is PHP SOAP Extension

Installing SOAP Extension on Windows

PHP SOAP Extension Client Programs

PHP SOAP Extension Functions for Client Programs

Calling WSDL Operation Directly

Call WSDL Operation with SoapClient::__soapCall()

Dumping SOAP Request and Response

Call WSDL Operation with SoapClient::__doRequest()

PHP SOAP Extension Server Programs

PHP SOAP Extension Functions for Server Programs

HelloServer.php - First SOAP Server Application

HelloServer12.php - SOAP 1.2 Server Application

HelloServerWsdl.php - SOAP 1.2 Server in WSDL Mode

HelloServerWsdl2.php - SOAP 1.1/1.2 Server in WSDL Mode

PHP SOAP Web Service Example - getTemp

SOAP Perl Implementations

SOAP Perl Implementation - SOAP::Lite

Installing ActivePerl Latest Version on Windows

Insatlling SOAP::Lite Package

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

SOAP Communication Model

What Is SOAP::Lite

SOAP::Transport::TCP::Server - SOAP Server with TCP Protocol

SoapTcpClient.pl - SOAP Client Example with TCP Protocol

SOAP::Lite Tracing Functions

SOAP::Transport::HTTP - SOAP Server with HTTP Protocol

Perl Socket Test Program for HTTP and SOAP

SocketRequestResponse.pl - 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 GetTemp

SOAP 1.2 Request and Response of GetTemp

Perl SOAP::Lite for NumberToWords SOAP 1.1 Web Service

NumberToWords Failed - Unexpected Parameter "c-gensym3"

NumberToWords Failed - Invalid namespace ""

NumberToWords Worked - Setting Namespace and Parameter

Perl SOAP::Lite for SOAP 1.2 Web Services

Message Styles Supported in SOAP::Lite

Methods on SOAP::Lite Client Object

Testing SOAP::Lite Client Objects

Differences between SOAP 1.1 and SOAP 1.2

NumberToWords_localhost.pl - Testing on Local Host

soapversion('1.2') and envprefix('soap12') Must Used Together

default_ns() - Setting Namespace for Body Elements

SOAP::Data - Utility Class to Generate XML Elements

SOAPAction - Not Needed, But No Way to Remove It

NumberToWords_SOAP_1_2.pl - SOAP::Lite for SOAP 1.2 Web Service

Perl SOAP::Lite for WSDL

SOAP Java Implementations

What Is SAAJ (SOAP with Attachments API for Java)

SOAP Java Implementations: Axis and Apache WebService

Axis Installation Requirements on Windows

Installing Axis 1.2.1 on Windows

Installing JAF 1.0.2

Java Socket and HttpURLConnection for SOAP

SocketRequestResponse.java - Socket Client Testing Program

SocketRequestResponseServer.java - Socket Server Testing Program

Capturing the HTTP Request from a Browser

"read(byteBuf) = -1" Not Working

Using java.net.HttpURLConnection to Send SOAP Messages

Using HttpURLConnection to Call SOAP 1.1

Capturing HTTP Request Generated by the HttpURLConnection Class

Calling NumberToWords SOAP 1.1 Web Service

Using HttpURLConnection to Call SOAP 1.2

Calling NumberToWords SOAP 1.2 Web Service

SAAJ - SOAP with Attachments API for Java

SoapUI - SOAP Web Service Testing Tool

What Is SoapUI

Downloading and Installing SoapUI

Validating and Inspecting WSDL Documents

Using Interface Viewer on Bindings

Generating SOAP Test Request

Submiting SOAP Test Requests to Server

WS-Security - SOAP Message Security Extension

What Is WS-Security (WSS)

Using XML Signature and Encryption with WSS

SOAP Header Element "Security"

What Is WS-Security Username Token Profile

SoapUI Configuration for Username Token

Generating Username Token with SoapUI

Validating wsse:Password Digest String

Password Digest Validation Program

WS-Security X.509 Certificate Token

Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service

GetSpeech Failed - Incorrect SOAPAction Header Line

GetSpeech Failed - Incorrect Parameter Name c-gensym

Using Socket Program to Request Parameter Name

GetSpeech Worked - Using SOAP::Data Class and on_action() Function

GetSpeech_SOAP_1_1.pl - SOAP::Lite for SOAP 1.1 Web Service

Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services

Installing SOAP::Lite 0.710 to Support SOAP 1.2

GetSpeech Request Differences between SOAP 1.1 and 1.2

Unsupported Media Type: "application/soap"

DEFAULT_HTTP_CONTENT_TYPE='application/soap+xml'

content_type() method in the HTTP::Headers Class

Perl SOAP::Lite 0.710 for WSDL

First WSDL Test Failed with SOAP::Lite

Downloading and Editing WSDL Document

Testing service() Function Locally

soapversion('1.2') Sets Correct Envelope namespace

Error: Object reference not set to an instance of an object

Web Services and SOAP Terminology

Outdated Tutorials

Outdated SOAP::Lite 0.55 in ActivePerl 5.8.7

Outdated: SOAP 1.1 Request - Content-Length Too Small

Outdated: SOAP 1.1 Request - Content-Length Too Large

Outdated: SOAP 1.1 Request and Response of GetSpeech

Outdated: SOAP 1.2 Request and Response of GetSpeech

Outdated: Calling GetSpeech SOAP 1.1 with SAAJ

Outdated: Calling GetSpeech SOAP 1.2 with SAAJ

References

Full Version in PDF/EPUB

Keywords: SOAP, UDDI, WSDL, Web service