Simple Object Access Protocol defines the request and response message format in a web service. It is XML-based communication format and encoding format for inter-application communication. SOAP is built to use for cross-platform, cross-language distributed computing applications knows as Web Services.
Apache eXtensible Interaction System is an open source SOAP implementation for web service framework. AXIS is used to constuct SOAP processors such as clients, servers, gateway etc. or in other words, AXIS is a SOAP engine. AXIS can generate Web Services Description Language (WSDL) for other systems.
Web Services Description Language is an XML format that describes the functionality of a web service. WSDL provides machine readable description how a web service can be called, what data it expact and how it responds to the client.
How to create Web-Service
Create a dynamic web project in eclipse.
Create processor class for your web-service. You can have as many as processors for your web service. These processors are the endpoints for your web services.
Add the bussiness login inside the processor. I've added the following sample code to acess the users ids from a sample database.
Please notice, I've used JNDI to get the DataSource from container. Please refer this to understand how we configure JNDI DataSource for a container.
Right click on processor class. Click 'Web Service'-> 'Create Web Service'
Select your configured Server Runtime and Web Service Runtime for your project and click Next. Check the allowed methods for web service and click Finish. Once you Create Web Service, it will generate the WSDL and WSDD configuration as per your java classes.
Start the server.
Service is available now the at your server runtime. I deployed the web service on my local tomcat server and it is available at the following url -
The url show all the web services generated at this url. Clicking wsdl lead to the WSDL generated for your web service. AXIS generate two web services Version and AdminService for itself along with your web service.