Calling NumberToWords SOAP 1.2 Web Service

This section provides a tutorial example on how to run HttpURLConnection12.java to call the NumberToWords SOAP 1.2 Web service provided by dataaccess.com.

To test HttpURLConnection12.java, I need to use the NumberToWords Web service provided by dataaccess.com/webservicesserver/numberconversion.wso?op=NumberToWords.

Here is a SOAP 1.2 request example, soap_1_2_NumberToWords_req.xml:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
      <ubiNum>104</ubiNum>
    </NumberToWords>
  </soap12:Body>
</soap12:Envelope>

Here is the execution result of HttpURLConnection12.java of the NumberToWords Web service:

herong> java HttpURLConnection12 \
   http://www.dataaccess.com/webservicesserver/numberconversion.wso \
   soap_1_2_NumberToWords_req.xml res.xml
   
Request length: 291
Response length: 351

herong> more res.xml
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
 <soap:Body>
  <m:NumberToWordsResponse
   xmlns:m="http://www.dataaccess.com/webservicesserver/">
   <m:NumberToWordsResult>one hundred and four </m:NumberToWordsResult>
  </m:NumberToWordsResponse>
 </soap:Body>
</soap:Envelope>

Wonderful. My HttpURLConnection12.java works perfectly too.

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 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

 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

 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