Translate

jueves, 1 de enero de 2015

Webservice Example with axis2 part 3: How to define the web services operations in a template class

This is the third post to show how to create a web service with a simple operation and a complex operation based on Axis2.

In this series of posts we are going to show this points:












Now we are going to learn how to create a complete webservice based on a template class. This class is going to be a template with the name of the webservice, the operations (one simple, and one complex) and the input and output paramaters of each operation.

You can see in the picture the first steps that we need to create the webservice. To do this 

  1. Create a Java class (an abstract class) with the operations and specify:
    1. Operation name
    2. Operation input parameters 
    3. Operation output parameters 
We are going to create two operations, one simple operations with basic data types and a second operation with a complex data type in the input and output parameters.

The result is this class

--- Axis2ServiceExample.java

---