Web service technology is a huge and evolving topic with numerous specifications. In this chapter we just scratch the surface and focus on how to expose a Java application and a session bean as a web service, and how to invoke a web service from a Java client. In this chapter we will cover the following topics:
Overview of web service concepts
Exposing a Java application as a web service
The Web Service Definition Language (WSDL)
The GlassFish wsgen tool
Exposing a session bean as a web service
The idea behind web services is to expose an application as a service for clients over the web independently of the application and clients' execution environments. The application may be fine grained, such as a mathematical calculation, or coarse grained, such as processing an order. Interoperability is an important goal of web services and all leading technology providers, including Microsoft, have subscribed to web services standards...