Introduction to Axis2 WebService — development environment construction and concept understanding
On the concept of web service, there are various explanations on the Internet, but it is not easy to understand.
It can be understood as follows: 1 A web service is a "function", but this function is written by others and placed on others' websites. 2. Publishing a web service means publishing a "function"; 3. Calling a WebService is to call a "function", call other people's methods, and get some data without effort. For example, weather forecast is a web service. Its function is to release the weather; If I need to know the weather of a, I don't need to collect and detect it myself. I just need to call the weather WebService through a few lines of code and pass him a parameter (this parameter may be the city name or postal code, depending on the parameters in the WebService method). At this time, he will return some data, such as sunny and 30C..
After understanding the basic concepts, they may still be vague and don't know what to do. Then you need to write a hello world and understand it slowly. Before writing a hello world, we need to do some preparatory work. The following describes the preparatory work. The next blog post describes how to publish a HelloWorld.
1、 Environmental preparation. 1. Download axis War is usually a compressed package. I downloaded axis2-1.4 1-war. Zip. After decompression, there is an Axis2 war。 2. Download the Axis2 development plug-in, Axis2_ Codegen_ Wizard_ 1.3. 0, and Axis2_ Service_ Archiver_ 1.3. 0 Plug in the shelf and package directly Baidu name, there are a lot of downloads.
2、 Rack installation and environmental test 1 After downloading the rack, unzip it directly to MyEclipse \ dropins. Start MyEclipse and click New - > others to see more than one thing, as shown in the figure:
2. Axis environment test.
The downloaded Axis2 Put war under webapps of Tomcat and start Tomcat. At this time, Tomcat will unzip the war file. You can see that there is an Axis2 folder under webapps. You can click in to see what directories there are. After Tomcat is started successfully, enter in the browser: http://localhost:8080/axis2 If the following interface description appears, it will be successful. Here is a service connection. Click in the web service we will publish in the future to see it.