Skip to Content
Java SOA Cookbook
book

Java SOA Cookbook

by Eben Hewitt
March 2009
Intermediate to advanced
740 pages
20h 32m
English
O'Reilly Media, Inc.
Content preview from Java SOA Cookbook

Chapter 6. Creating Web Service Applications with JAX-WS

Introduction

The SAAJ API, introduced in Chapter 5, offers a powerful, flexible way to work with web services at a low level. The Java API for XML Web Services (JAX-WS) is a high-level API for consuming and providing web services. This chapter introduces JAX-WS and shows you how to use it for a wide variety of practical tasks.

JAX-WS in Relation to Other APIs

JAX-WS replaces the older JAX-RPC API. Unlike SAAJ, JAX-WS doesn’t require you to know very much about XML or WSDL. The entire XML layer is hidden from developers, who can instead just work with objects generated by web services tools that come with Java SE 6 and EE 5. These objects encapsulate all of the work of creating SOAP messages, invoking the service, and parsing responses, hiding significant complexity from developers. This can be convenient, and can make client maintenance much easier.

JAX-WS actually is built on top of SAAJ, using it under the hood to do its parsing and communication work. As you know, a web service as represented in a WSDL will define XML types for each of the message parts used in service requests and responses. In order to create object representations of these types, you need a binding language to convert (marshal) from Java to XML and back again. In the older API, this was done directly within JAX-RPC, which defined its own conversion mechanism. However, this was later deemed to complicate the specification, and Java to XML conversion came ...

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 in a Nutshell

Java Web Services in a Nutshell

Kim Topley
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: 9780596156091Errata Page