Home > Documentation > Developer's guide > Tutorials > Web services > Developing a JAX-WS POJO Web Service |
This tutorial will take you through the steps required in developing, deploying and testing a Web Service in Apache Geronimo. After completing this tutorial you should be able to understand how to develop simple JAX-WS compliant web services in Apache Geronimo using Eclipse development environment.
This application has a Java class which contains two functions, one which converts amount in Dollars to Rupees and the other which converts Rupees to Euros. We will expose these two methods as the services provided by our deployed Web Service.
We will also test the deployed web service by using the Web Services Explorer in Eclipse
For new users, Web Services can be created in two ways:
This tutorial will help you in creating a Bottom Up Web Service from a Java class which will be exposed as a Servlet to the client applications.
To run this tutorial, as a minimum you will be required to have installed the following prerequisite software.
Details on installing eclipse are provided in the Development environment section.
This tutorial will take you through the following steps:
Let us try to understand each annotation:
Geronimo processes the annotations in source files and automatically generates the required artifacts to deploy the Web Service.
You can see the Geronimo created files in the directory <INSTALL_DIR>/repository/org/apache/geronimo/samples/jaxws/jaxws-converter/1.0/jaxws-converter-1.0.car/. At this location you can find a new directory which Geronimo created for deploying the web service which contains the WSDL file and other required stubs.
Geronimo has a built-in plug-in named jaxws-tools which provides tools for generating WSDL and other necessary files used in JAX-WS web services. The plug-in relies on Sun's wsgen and wsimport tools to generate the web services artifacts. Please see wsgen or wsimport documentation for more information.
This completes the process of deploying the web services in Geronimo and testing them. You can also refer to the following tutorial to develop a actual client for a web service that is deployed already on server Developing Client Applications for a JAX-WS Web Service
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2011, The Apache Software Foundation, Licensed under ASL 2.0. |