Setup Apache Axis2 on Ubuntu

This tutorial helps you to setup Apache Axis2 on Ubuntu and to add it to Eclipse IDE for Java EE Developers.

Step 1:
Download the latest version of Apache Axis2 from this link.

Step 2:
Open the Terminal (Ctrl + Alt + T) and enter the following command to change the directory.
cd /opt/

Step 3:
Enter the command given below to extract the Axis2 from  the ~/Downloads directory. If your downloaded file is in any other directory and replace the last parameter by the actual file path.
sudo unzip ~/Downloads/axis2-1.7.1-bin.zip -d .

Step 4:
Rename the folder name to axis2.
sudo mv axis2-1.7.1/ axis2/

Step 5:
To deploy web services, you may need to add some files inside this folder. Therefore it is required to change the permission of this directory. Enter the following command to change the permission of axis2 folder.
sudo chmod -R 777 axis2/

Step 6:
Environment variables AXIS2_HOME and PATH have to be added to the system. Enter the following command in the terminal to open the /etc/environment.
sudo gedit /etc/environment

Step 7:
Add the following line at the end of the file.
AXIS2_HOME="/opt/axis2"

Add the /opt/axis2/bin to the PATH.

The /etc/environment before the modification.

The /etc/environment after the modification.

Step 8:
Reload the environment variables to the current terminal using this command.
source /etc/environment

Step 9:
Enter the following command to start the Axis2 server.
axis2server.sh

Step 10:
Visit to the following URL.
http://localhost:8080/axis2/services/
If you get the Deployed services page, you have successfully setup the Apache Axis2 in your system.

Step 11:
To stop the Axis2, press Ctrl + C in the terminal which is currently running the axis2server.

Integrate Axis2 with Eclipse
If you do not have Eclipse IDE for Java EE Developers, follow this link and install the Eclipse.

Step 1:
Open the Eclipse.

Step 2:
Goto Windows → Preferences in the menu bar and select the Axis2 Preferences under the Web Services.


Step 3:
Click on the 'Browse' button and select the Axis2 home directory.


Step 4:
Click ‘Apply’ and ‘OK’

Now you are ready to use Apache Axis2 from Eclipse.
Previous
Next Post »

Contact Form

Name

Email *

Message *