Accessing an EJB from a web service (JAX-WS)

Java EE 6 supports Java API for XML Web Services (JAX-WS) based web applications. These are frequently referred to as "big" web services because they use Simple Object Access Protocol (SOAP) XML messages. This protocol provides a standard approach for accessing remote objects. The functionality supported by the service is provided in a Web Services Description Language (WSDL) file. This file is a standard way of describing an application's services.

In this example, we will create a TimeOfDay class with a single method. The method will return a string representing the current date and time. We will use a singleton session bean to support the time service. A singleton is a session bean for which there ...

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.