Chapter 10. Web Services

In this chapter, we will cover:

  • Creating an EJB-based web service using JAX-WS
  • Creating an EJB-based web service using JAX-RS
  • Using an MDB as part of a web service


A Web Service is an application which provides functionality for a client. Clients are typically web browsers but can also be standard applications. The communication between a client and a service is facilitated through standard protocols that connect to end-points created for the services. The term, endpoint, refers to a specific location used to access the web service.

From a Java perspective, web services can be divided into two broad categories. The first category is the Java API for XML Web Services (JAX-WS) and is based on XML and the Simple Object ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.