Skip to Content
Java Web Services in a Nutshell
book

Java Web Services in a Nutshell

by Kim Topley
June 2003
Intermediate to advanced
672 pages
23h 48m
English
O'Reilly Media, Inc.
Content preview from Java Web Services in a Nutshell

Name

SOAPConnection

Synopsis

public abstract class SOAPConnection {
// Public Constructors
    public SOAPConnection(  ); 
// Public Instance Methods
    public abstract SOAPMessage call(SOAPMessage request, Object to)
    throws SOAPException; 
    public abstract void close(  ) throws SOAPException; 
}

SOAPConnection is an object that can be used to send SOAP messages. Despite its name, it does not represent a connection in the traditional sense, since it does not have a fixed association with a peer object. Instead, it is better thought of as an access point that can be used to send any number of individually addressed SOAP messages to arbitrary receivers.

To obtain a SOAPConnection, you need to use a SOAPConnectionFactory:

SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance;
SOAPConnection conn = factory.createConnection;

Both SOAPConnectionFactory and SOAPConnection are abstract classes, concrete instances of which are provided by your SAAJ implementation. The fact that the SOAPConnectionFactory newInstance( ) method searches for a suitable implementation class (as described in its reference section in this chapter) means that you can plug in different SAAJ implementations without changing your application code. When a SOAPConnection is no longer required, it should be released by calling its close( ) method.

The call( ) method takes a SOAPMessage object, serializes it into XML, and sends it to the destination given by its to argument. This argument is declared to be of type Object, which ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Java Web Services

Java Web Services

David A Chappell, Tyler Jewell
RESTful Java Web Services - Third Edition

RESTful Java Web Services - Third Edition

Balachandar Bogunuva Mohanram
SOA with Java: Realizing Service-Orientation with Java Technologies

SOA with Java: Realizing Service-Orientation with Java Technologies

Thomas Erl, Andre Tost, Satadru Roy, Philip Thomas, Raj Balasubramanian, David Chou, Thomas Plunkett

Publisher Resources

ISBN: 0596003994Catalog PageErrata