Java Socket and HttpURLConnection for SOAP

This chapter provides tutorial examples and notes on using java.net.Socket and java.net.HttpURLConnection classes to send HTTP requests with SOAP XML messages. Topics include writing socket client and server programs for request and response communication; writing HttpURLConnection programs to send GetSpeech SOAP 1.1 and SOAP 1.2 XML messages.

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 GetSpeech SOAP 1.1

Capturing HTTP Request Generated by the HttpURLConnection Class

Calling GetSpeech SOAP 1.1 Web Service

Using HttpURLConnection to Call GetSpeech SOAP 1.2

Calling GetSpeech SOAP 1.2 Web Service

Conclusions:

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

 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

 References

 PDF Printing Version