O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

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

Deploying Web Services

As with the other J2EE components (EJB, web) and resources (JMS Destinations, JavaMail Sessions, JDBC DataSources, and so on) discussed in this book, web service implementations need to be deployed to an application server. And, as with these other things, deploying a web service isn’t simply putting your code up on the server. You need to tell the web service engine how to manage your web services at runtime.

The web service engine is responsible for accepting SOAP requests from clients, converting them into appropriate method calls on your Java implementation code , and taking the results of those method calls and converting them into the appropriate SOAP responses to the clients. In order to do this, the web service engine needs to know the following information for each web service that you want to deploy:

Java implementation code

What Java code implements the web service, and what aspects of the Java code should be part of the web service?

Java-to-XML mapping

How should the Java entities in your service implementation (interfaces, data objects, exceptions, etc.) be converted into SOAP/XML entities and vice versa? This covers both the description of your web service in the form of a WSDL document and conversions between SOAP entities and Java entities at runtime when operations are invoked.

This information is provided in the form of deployment descriptors and/or configuration files. These typically include:

Web service deployment file

This file defines the web ...

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