O'Reilly logo

Apache Axis2 Web Services Second Edition by Afkham Azeez, Deepal Jayasinghe

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

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 ...

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