Use axis in ubuntu to develop webservice

Source: Internet
Author: User
Use axis in ubuntu to develop webservice-general Linux technology-Linux programming and kernel information. The following is a detailed description. Author: brave in mind

In fact, tomcat + axis is not difficult to develop web Services, but it was previously implemented in windows. This is the first implementation in ubuntu, and there are not as many related materials as in windows, so write down the process and share it with you. The specific environment and software versions are: ubuntu server 7.10, Sun JDK 1.6.0, Tomcat 5.5.26, and Axis 1.4.

1. Install jdk
1. Install
Sudo apt-get install sun-java6-jdk

2. Select the default
Sudo update-alternatives -- config java
The system will list available java and enter the number you want.

3. Configure the JAVA_HOME environment variable
Echo "export JAVA_HOME =/usr/lib/jvm/java-6-sun" >> ~ /. Bashrc

Source ~ /. Bashrc
Source does not seem to work either. Modify ~ /. Bashrc must be restarted before it takes effect. You can restart it later after adding CATALINA_HOME.

2. install tomcat and tomcat admin
1. the download paths of the installation files are:
Http://apache.mirror.phpchina.co... omcat-5.5.26.tar.gz
Http://apache.mirror.phpchina.co... 5.5.26-admin.tar.gz
The downloaded file is stored in the root directory of the user.

2. install and configure tomcat
A. Unzip tomcat
Cd ~

Tar-xvzf apache-tomcat-5.5.26.tar.gz

B. Configure Environment Variables
Echo "export CATALINA_HOME = ~ /Apache-tomcat-5.5.26 ">> ~ /. Bashrc

Source ~ /. Bashrc
Now you can restart the system.

C. If you need to modify the tomcat port, you can find port 8080 in $ CATALINA_HOME/conf/server. xml and change it to the port you want.

D. Add management users
Modify $ CATALINA_HOME/conf/tomcat-users.xml to add two lines:


The location is next to the other "role" and "user" lines.

E. Start and close tomcat commands
$ CATALINA_HOME/bin/startup. sh

$ CATALINA_HOME/bin/shutdown. sh
After startup, you can enter the following in your browser:
Http: // localhost: 8080
You can see the tomcat home page. Be sure to fill in the IP address and port.

F. Decompress tomcat admin
Cd ~

Tar-xvzf apache-tomcat-5.5.26-admin.tar.gz
You can access the: http: // localhost: 8080/admin page.
The username and password are respectively admin and admin (set in Step d)

3. Install axis
A. Download axis 1.4 and its source file. Path:
Http://apache.panu.it/ws/axis/1_4/axis-bin-1_4.tar.gz
Http://apache.panu.it/ws/axis/1_4/axis-src-1_4.tar.gz

B .decompress axis-bin-1_4.tar.gz, copy the axis directory under the axis-1_4 subdirectory webapps directory to $ CATALINA_HOME/webapps, and then delete the axis-1_4 directory
Cd ~
Tar-xvzf axis-bin-1_4.tar.gz

Cp-r axis-1_4/webapps/axis $ CATALINA_HOME/webapps/

Rm-r axis-1_4

C.decompress axis-src-ipv4.tar.gz and copy activation. jar from axis-1_4/lib to $ CATALINA_HOME/common/lib
Cd ~

Tar-xvzf axis-src-1_4.tar.gz

Axis-1_4/lib/activation. jar $ CATALINA_HOME/common/lib

D. Copy tools. jar from $ JAVA_HOME/lib to $ CATALINA_HOME/common/lib.
Cp $ JAVA_HOME/lib/activation. jar $ CATALINA_HOME/common/lib

E. Copy the mail. jar file from http://java.sun.com/products/javamail/downloads/index.htmlto $ CATALINA_HOME/common/lib.
F. Copy the lib/xmlsec-1.3.0.jar to $ CATALINA_HOME/common/lib from http://xml.apache.org/security/dist/java-library/download xml-security-bin-1_3_0.zip
In steps e and f, only the zip format is supported, so...

4. verify whether the installation is successful
A. Restart tomcat and access http: // localhost: 8080/axis/
If the Apache-Axis welcome page is displayed, the installation of axis is successful.

B. The Examining webapp configuration page is displayed when you enter the Validation page.
If all the items of Needed Components and Optional Components are Found, the installation can finally come to an end (gasped). If you are free, then write about how to develop the program.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.