The code first approach
In the code first approach, we start by writing the service implementation class, that is, the class that provides the service. We will begin by writing a simple web service that says Hello <name> when invoked. Note that <name> here will be your name given as an input parameter to the service.
Single class POJO approach
Let us first write our service implementation class. Since Axis2 is a Java-based web service framework, we are going to use Java as the primary language for implementing the service. Hence, the Java code for your service class should be somewhat like the following. In this case, let us assume that the class does not have any package name declared, that is, the class is in the default package.
public class ...