O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required