You are inside a passionate computer engineer's lab...
Proceed at your own risk...

Look for something inside my Lab...

Installing and configuring Apache Axis C++ on Windows

Briefly, I am sharing an experience with anyone interested in Apache Axis C++ installation and configuration.

I illustrate how to install Apache Axis C++ and configure the system for it, then how to get a working example of Calculator.

First, Four programs are to be installed:
  1. GNUWin32 0.6.3
  2. Apache HTTPD 2.0.64
  3. Xerces c2.2.0
  4. Apache Axis C++ 1.6 beta
 Some files are to be downloaded from here. Once everything installed, we proceed to configuration.

GNUWin32

There is nothing special to do for this, but let's say it was installed in the folder T.

Apache HTTPD

Let's say it was installed in the folder Z. Open the text file "Z\conf\httpd.conf" and append the following text to end of it:
LoadModule axis_module modules/mod_axis2.so
<Location /axis>
   SetHandler axis
</Location>

Xerces

  1. Extract the compressed file in a folder, let's say X.
  2. Copy the file "X\bin\xerces-c_2_2_0.dll" on the desktop, we will use it later. You can delete the remaining extracted files.

Apache Axis C++

Axis will be installed in two folders on the machine; one for development (with the /include and /lib and others) and one for deployment of binaries of the Web services on the server side.
  1. Extract the compressed file of Axis in a folder, let's say Y.
  2. Rename the file "Y\bin\AxisXMLParserXerces.dll" to "Y\bin\AxisXMLParser.dll".
  3. Move the file "xerces-c_2_2_0.dll" from the desktop to "Y\bin\xerces-c_2_2_0.dll".
  4. Copy the files "MSVCP70.DLL" and "msvcr70.dll" from the desktop to "Y\bin\MSVCP70.DLL" and "Y\bin\msvcr70.dll" respectively. Il would also recommend copying those files to the system folder "Windows\System32".
  5. Move the file "axiscpp.conf" to "Y\deploy\axiscpp.conf".
  6. Create an empty folder "Y\deploy\repository".
  7. Copy all the contents of the folder "Y\bin" to the folder "Y\deploy\lib".
  8. Copy the folder "Y\deploy" in the folder "Z".
  9. Rename the folder "Z\deploy" to "Z\Axis".
  10. Copy the file "Z\Axis\lib\mod_axis2.dll" to the folder "Z\modules".
  11. Rename the file "Z\modules\mod_axis2.dll" to "Z\modules\mod_axis2.so".
  12. Open the file "Z\Axis\axiscpp.conf" and adapt it depending on the exact installation configuration.
Now we need to set some environment variables. Adapt those to your own installation configuration.
  • New variable: AXISCPP_DEPLOY=Z\Axis
  • Append to variable: PATH=...;T\bin;Z\bin;Z\Axis\lib
Now, the platform is ready. Let's experiment with an example.

Calculator example

The Calculator example is made up of multiple files for source code, and configuration, and description.
Some description files already exist in Axis for this trivial example. We will add the configuration file "server.wsdd" and some source files.
  1. Copy the file "server.wsdd" to the folder "Z\Axis\conf".
  2. Open the file "Z\Axis\axiscpp.conf" and adapt it to match the installation configuration. Particularly, the line: "WSDDFilePath:".
  3. Copy the folder "Calculator" in your development folder/workspace.
  4. Compile the Calculator server-side project to generate the binary "Calculator_Server.dll".
  5. Adapt the file "Z\Axis\conf\server.wsdd" to the location of the file "Calculator_Server.dll".
  6. Compile the Calculator client-side project to generate "Calculator.exe".
Until here, the example is compiled and deployed. Let's run it!
  1. Start Apache HTTPD.
  2. Using the Windows shell (DOS) or the IDE, run "Calculator.exe" with some parameters, and observe the results. For exemple:
    "Calculator.exe mul 4 3 http://localhost:8080/axis/Calculator"
    This prints "12" on the console: the result of running the web service on the server.
  3. An abservation of "Z\logs\access.log" shows a treated request by HTTPD:
    "POST /axis/Calculator HTTP/1.1" 200 400