官术网_书友最值得收藏!

Project pre-requisites

Before starting to implement the project, let's make the project environment ready.

Java

We are going to develop the sample project using Java. Therefore, make sure to install JDK1.6 or later version in your machine.

Apache Ant

We will be using Apache Ant to build our project. Of course, you may use any build tool you prefer.

You can download the latest version of Apache Ant from http://ant.apache.org/bindownload.cgi and follow the installation guide to set up Ant on your machine.

MySQL

MySQL will be used as the database management system in our sample project. All data used in sample hotel reservation system will be stored in a MySQL database. Therefore, we should set up MySQL in our machines. We can download MySQL from http://www.mysql.com/downloads/mysql/ and follow the instructions given in the installation guide to set it up on your machine.

Setting up Apache Axis2

There are numerous web service frameworks which can be used in web services development and deployment. Apache CXF (http://cxf.apache.org/) and Apache Axis2 (http://axis.apache.org/axis2/java/core/) are two examples of popular open source web service frameworks. The pure RESTful web service frameworks such as RESTeasy (https://www.jboss.org/resteasy/) can also be used in web services implementation.

We will use Apache Axis2 web services framework in our sample project because Apache Axis2 is primarily a SOAP based web services engine and our sample project is focused on a set of SOAP-based web services. Let's set up Axis2 on our machine according to the following steps:

  1. You can download the binary distribution of Apache Axis2 from http://axis.apache.org/axis2/java/core/download.cgi. Download the binary and extract it into a folder in your file system.

    Tip

    Apache Axis2-1.6.1 was the latest version at the time of writing the book. You may download the same or the latest version.

  2. Let the extracted folder of the Axis2 binary distribution be AXIS2_HOME. Open a command window or shell and change the directory to AXIS2_HOME/bin.
  3. Export the AXIS2_HOME environment variable as follows:

    In Linux:

    export AXIS2_HOME=/home/user/axis2-1.6.1

    In Windows:

          set AXIS2_HOME=/home/user/axis2-1.6.1
  4. Start Axis2 server by executing axis2server.sh or axis2server.bat as follows:
    sh axis2server.sh
    

Setting up project source directories

As of now, we have configured the Java runtime environment, Apache Ant, MySQL database management system, and Apache Axis2. Now, we are going to set up the source folder structure of our sample web services development project so that we can start adding code.

  1. Create a directory in your file system, let's name it as sample-project.
  2. Create the following sub-directories under the sample-project folder:
    • src: It is used to store the java source files
    • build: The ant build.xml file will be stored here
    • conf: It is used to store all configuration files
主站蜘蛛池模板: 治多县| 大荔县| 通山县| 安徽省| 周口市| 涞源县| 义乌市| 霞浦县| 海南省| 连平县| 商城县| 卢龙县| 绥江县| 田林县| 长汀县| 疏勒县| 内江市| 新安县| 加查县| 南开区| 清苑县| 临洮县| 白河县| 西丰县| 江永县| 肃南| 南丹县| 平罗县| 大城县| 平定县| 长泰县| 镇巴县| 灯塔市| 西峡县| 霍林郭勒市| 康乐县| 和硕县| 康定县| 越西县| 大理市| 云龙县|