The Pacman Project

The Webservice

When trying to write a webservice, some software is needed that handles the connections between the host/server and the clients. In our project several functionalities were needed to make the clients communicate with the central server. The central server of this project provides these functionalities which can be used by the PDA clients or other clients. Each client imports the WSDL-file (Web-Service-Description-Language) which is located on the server and in which is described what functionality the server provides for the clients. The WSDL-file is an XML Document which is (in our project) automatically generated by the AXIS-Server. It describes which parameters and return values are provided by the webservice, to which Internet-Protocol (IP) address the server is bound and also contains other information.

 

4.1 Axis

The used Webservice-System is called AXIS2 and is often used together with a Tomcat-Server. Tomcat and Axis both belong to the Apache Webserver Framework and are provided by the Apache Foundation.

 

4.2 Installation

The Axis-Webservice-Server comes in two different versions: One is a binary distribution which runs on its own, the other one is an extension for the TomcatJava-Webserver. In our project we first made tests with the Tomcat Server but got a lot of errors and java-exceptions which we could not solve. That is why we decided to run the binary standalone distribution. It is a compressed zip-file which was installed in the server's /opt/axis2-1.4 directory.

 

4.3 Building a webservice

When trying to build a webservice, there are several ways to do that. After a lot of tests with different methods, we used the inner Axis Functionality to help us building webservices. Axis provides several additional scripts to generate e.g. WSDL-files from Java-Code or generate Java-Classes from a given WSDL-file. In our way, we put a webservice.aar file in the repository/services directory of Axis and restarted the build in Axis-Server.

 

4.4 The Deployment Workflow

The used Integrated Develpment environment (IDE) is eclipse. We have a shell-script which packs the class-files into an .aar package, adds other files (like a services.xml file) and copies this file via Secure-Copy (SCP) to the server. There, another script is automatically started. The server-script kills all processes which run Axis and restarts axis. Because of the fact that all started processes on a linux system belong to the current shell, the axis-server must be started without belonging to a specific shell. This is done by the 'nohup' command which runs the axis-server in the background. The given output of the axis-server is written to the command line because of debugging reasons. Now all Webservices are provided and can be seen in the Axis-Standards-Page.

 

4.5 Provided Functionality

The PacMaas Web Service provides different functionality which is used by the clients.

 

<<< Previous | Index | Next >>>