Test and development environment axis2 installation (Windows platform) I. Set environment variables (reference)
Axis2_home = c: \ Program Files \ axis2
Catalina_home = c: \ Program Files \ Tomcat \ apache-Tomcat-5.5.20
Classpath = .; c: \ Program Files \ Java \ jdk1.5.0 _ 11 \ Lib \ DT. jar; C: \ Program Files \ Java \ jdk1.5.0 _ 11 \ Lib \ tools. jar; C: \ Program Files \ Tomcat \ apache-Tomcat-5.5.20 \ common \ Lib \ servlet. jar;
Java_home = c: \ Program Files \ Java \ jdk1.5.0 _ 11
Description:
1. axis2 standard binary distribution unzip to the C: \ Program Files \ axis2 directory
2. tomcat installation version 5.5.20. installation directory c: \ Program Files \ Tomcat \ apache-Tomcat-5.5.20
3. JDK installation directory c: \ Program Files \ Java \ jdk1.5.0 _ 11
Ii. install and configure Tomcat
3. Download and install JDK
4. Download axis2 war (Web Archive) Distribution
In this version, axis2 can deploy to almost all servlets containers. The current version is Apache axis2/Java version 1.2. The download URL is as follows:
Http://apache.ziply.com/ws/axis2/1_2/axis2.war
5. Download axis2 standard binary Distribution
This is the complete version of axis2, including the example, lib library, and can also be started as a separate web server. WS-Addressing and soap monitor are in this version. Therefore, this version includes addressing. Mar and soapmonitor. Mar. Other development modules which need to be downloaded and installed separately.
URL: http://apache.ziply.com/ws/axis2/1_2/axis2-1.2.zip
Decompress the package to the specified directory, for example, c: \ Program Files \ axis2.
6. Copy axis2.war to the Tomcat webapps directory
Tomcat will automatically decompress and generate the axis2 directory
5. Access axis2
Http: // localhost: Port/axis2
6. Modify the management username and password of axis2
Modify $ tomcat_home/webapps/axis2/WEB-INF/CONF/axis2.xml
Default username and password:
<Parameter name = "username" locked = "false"> admin </parameter>
<Parameter name = "password" locked = "false"> axis2 </parameter>
Modify the preceding username and password:
Restart Tomcat (Source: www.iocblog.net)
7. install and configure TCP Monitor
Download TCP monitor ,:
Http://mirror.utdlug.org/apache/ws/commons/tcpmon/1_0/tcpmon-1.0-bin.zip
Decompress tcpmon-1.0-bin.zip and execute:
Tcpmon. bat
The GUI configuration is as follows:
Listening to port 8888 indicates that TCP monitor listens to port 8888 of the local machine;
Remote Host: 127.0.0.1, port 80
Indicates that all requests sent to port 8888 of the local machine are forwarded to port 80 of the remote host. If Tomcat port is 80, all test data packets can be debugged by monitoring TCP monitor.
8. Install eclipse and related integration
To be continued
9. Basic test
Enter in IE
HTTP: /localhost: 8081/axis2/rest/version/getversion
IE browser result output
-<Ns: getversionresponse xmlns: NS ="Http://axisversion.sample/xsd">
<Ns: Return> Hello I am axis2 version service, my version is 1.1.1 </ns: Return>
</Ns: getversionresponse>
TCP monitor listens to port 7777 and redirect to port 8081 of the Local Machine
Enter in IE
HTTP: /localhost: 7777/axis2/rest/version/getversion
IE browser result output
-<Ns: getversionresponse xmlns: NS ="Http://axisversion.sample/xsd">
<Ns: Return> Hello I am axis2 version service, my version is 1.1.1 </ns: Return>
</Ns: getversionresponse>
TCP monitor test result:
Input:
GET/axis2/rest/version/getversion HTTP/1.1 Accept :*/* Accept-language: En-US UA-CPU: x86 Accept-encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; infopath.1;. Net CLR 2.0.50727) HOST: 127.0.0.1: 7777 Connection: keep-alive COOKIE: JSESSIONID = 06cab51d246dbbaa04ca07b98f2079f8 |
Output:
HTTP/1.1 200 OK Server: APACHE-Coyote/1.1 Content-Type: Application/XML; charset = UTF-8 Transfer-encoding: chunked Date: Mon, 23 Jul 2007 06:02:57 GMT A5 <Ns: getversionresponse xmlns: NS = "http://axisversion.sample/xsd"> <ns: Return> Hello I am axis2 version service, my version is 1.1.1 </ns: Return> </ns: getversionresponse> 0 |
10. Install ant
Ant binary Distributions
Http://mirror.olnevhost.net/pub/apache/ant/binaries/apache-ant-1.7.0-bin.zip
Decompress the package to a specific directory, for example:
C: \ Program Files \ apache-ant
11. install Apache rampart-1.1
1. Download Apache rampart related URL: http://ws.apache.org/rampart/
2. Decompress rampart-1.1.zip
3. Set axis2_home. Note:
A) For the axis2 standard binary distribution version, axis2_home is the directory for installing axis2, for example: axis2_home axis2_home = c: \ Program Files \ axis2
B) For Tomcat deployed in war mode, you cannot copy data in ant mode unless you modify build. XML in the samples directory.
4. Go to the samples directory and run ant. Perform two major operations to copy the Lib files related to rampart to the lib directory of axis2, and copy all the MAR (modules) files to the modules directory of axis2. Note:
A) for Tomcat deployed as war, copy all the files in the Rampart lib directory. JAR file to $ tomcat_home/webapps/axis2/WEB-INF/LIB; copy all under the Rampart directory. mar file (includes two files: rahas-1.1.mar and rampart-1.1.mar) to $ tomcat_home/webapps/axis2/Web-INF/modules
5. Download xalan-2.7.0.jar, which is included in the default axis2 lib
6. Download log4j. Jar plugin
Production Environment axis2 installation 1. install and configure Tomcat 2. Download axis2 war (Web Archive) Distribution
In this version, axis2 can deploy to almost all servlets containers. The current version is Apache axis2/Java version 1.2. The download URL is as follows:
Http://apache.ziply.com/ws/axis2/1_2/axis2.war
3. Copy axis2.war to the Tomcat webapps directory
Tomcat will automatically decompress and generate the axis2 directory
4. Access axis2
Http: // hostname: Port/axis2
5. Modify the management username and password of axis2
Modify $ tomcat_home/webapps/axis2/WEB-INF/CONF/axis2.xml
Default username and password:
<Parameter name = "username" locked = "false"> admin </parameter>
<Parameter name = "password" locked = "false"> axis2 </parameter>
Modify the preceding username and password:
Restart Tomcat
6. Install ant (option)
7. install Apache rampart-1.1 (option)
To implement the WS-Security function through rampart, you can install Rampart