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

RPC-Style and Document-Style JAX-RPC

In Section 5.2.6, it was noted that the SOAP binding for an individual operation or for all operations defined within a portType element can have a style attribute that takes either of the values rpc or document. However, not much was said about the actual differences between these two styles. This section looks at how RPC- and document-style operations are represented in SOAP messages as well as at the support that JAX-RPC provides for each.

RPC-Style Operations

Perhaps not surprisingly, when you create client-side stubs and server-side ties for a web service for which the definition is supplied in the form of a Java interface, each method in the interface is mapped to an RPC-style operation. The distinguishing feature of an RPC-style operation is the way in which it is represented as a SOAP message, which is specified in section 7 of the SOAP 1.1 specification. For example, Figure 6-2 shows the message that is sent as a result of invoking the following method from the BookQuery interface from the book web service created in Chapter 2:

public String getAuthor(String name) throws RemoteException;

As you can see, the SOAP body contains a single element that is named for the operation being invoked. This element is in the namespace associated with the web service, which is provided in the config.xml file supplied to wscompile, as shown in Example 2-9. The arguments required for the method call are nested as child elements. In this case, a single element ...

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