Windows Installation guide for Axis C++

This document contains how to use the binary distribution of Axis C++. These binaries have been tested on following Microsoft platforms,
Windows 2000 Professional
Windows XP 2002 Professional

Contents

1. What binary distribution contains
2. Installation with Apache 1.3.x/2.x web server
3. Installation with Simple Axis Server
4. Running provided samples
5. Using Visual C++ to play with provided samples.
6. Writing your web services and client applications using Axis C++.

What binary distribution contains

1. There is a folder called "binary".

2. Inside this there are several folders named as follows,
-> bin
-> deploy
-> docs
-> include
-> lib
-> samples

3. The folder "bin" contains the following executables and dll's
Executables
-> AdminClient.exe (soap client to Deploy or Undeploy a web service)
-> base.exe (soap client for Interop base tests)
-> groupB.exe (soap client for Interop groupB tests)
-> SimpleAxisServer.exe (axis with a simple http server)
-> Calculator.exe (soap client for calculator sample)
-> cbase.exe (soap client for c interop base sample)
-> cgroupB.exe (soap client for c interop groupb sample)
-> doclitbase.exe (soap client for document literal interopbase sample)
-> doclitgroupB.exe (soap client for document literal interopgroupb sample)

DLL's
-> mod_axis.dll (axis module for apache 1.3.x http server) or
-> mod_axis2.dll (axis module for apache 2.x http server)


4. Inside the "deploy" folder follwing sub folders exists
-> conf - This includes the server.wsdd, which is the deployment descriptor used for deploying services.
-> handlers - This includes following DLL's,
- echoStringHeaderHandler.dll
- testhandler1.dll
-> libs - Contains following dlls which are needed by axis.
-AxisServer.dll
-> logs - Directory for logs


-> webservices - (contains sample web services that can be deployed with Axis C++)
- AdminService.dll (interop groupb sample web service)
- base.dll (interop base sample web service)
- Calculator.dll (sample Calculator web service)
- cbase.dll (sample interop c base web service)
- cGroupB.dll (sample interop c groupB web service)
- doclitbase.dll (sample interop doclitbase web service)
- doclitgroupB.dll (sample interop doclitgroupB web service)
- groupB.dll (sample interop groupB web service)

-> wsdls - Contains the following wsdls
AxisAdmin.wsdl
Calculator.wsdl
base.wsdl
cbase.wsdl
cGroupB.wsdl
groupB.wsdl
5. The "include" folder contains all the include files which are necessary for building Axis c++ clients.
6. "lib" folder contains jars needed to use the wsdl2ws tool.
7. "samples" folder contains sources for all the server and client samples including interop tests.

Installation with Apache 1.3.X/2.X web server

STEPS:

1. Install apache web server and locate the installation folder(For the defalt installation this is "C:\Program Files\Apache Group\Apache" for apache 1.3.X and "C:\Program Files\Apache Group\Apache2" for apache 2.X). Let say this folder to be APACHE_FOLDER.

2. Unzip axis-c-1.1-win32.zip to a folder of your choice. Say this folder is AXIS_EXTRACT.

3. Inside the extracted folder AXIS_EXTRACT you have a sub folder called deploy. Copy the whole deploy folder to APACHE_FOLDER.

4. Rename copied "deploy" folder to "Axis". Lets say this folder to be AXIS_FOLDER.

5. Set environment variable AXIS_HOME to point to above folder.

6. Add AXIS_FOLDER/libs to the PATH environment variable.

7. Edit Apache configuration file httpd.conf located in APACHE_FOLDER/conf and add following lines at the end.

LoadModule axis_module modules/AXISMODULE
<Location /axis>
SetHandler axis
</Location>

Where AXISMODULE is either mod_axis.dll for apache 1.3.X or mod_axis2.dll for apache 2.X.

8. Copy AXISMODULE from the AXIS_EXTRACT/bin folder to APACHE_FOLDER/modules folder.

9. Open the AXIS_FOLDER/axiscpp.conf_win for editing. The contents of the file will look as follows.

AXISLOGPATH:XXXX

WSDDFILEPATH:YYYY

Where XXXX will be the path to a file named AxisLog (The log file)and YYYY will be the path to the server.wsdd file. Give the appropriate values for XXXX and YYYY as follows.

i.e.

AXISLOGPATH: [APACHE_HOME]\Axis\logs\AxisLog

WSDDFILEPATH: [APACHE_HOME]\Axis\conf\WSDDFILE

Where WSDDFILE is [APACHE_HOME]\Axis\conf\server.wsdd for Apache 1.3 and Apache 2. (There will be three wsdd files in the [APACHE_HOME]\Axis\conf\ rename the relevant wsdd file for your platform to server.wsdd).

Also in order to run the samples provided do the following.
Open server.wsdd for editing. For each service element, locate the element "parameter", having the value "classname" for the "name" attribute.
Change the value of the "value" attribute, to have the absolute path to the indicated webservice dll in that value.

Rename AXIS_FOLDER/axiscpp.conf_win to AXIS_FOLDER/axiscpp.conf

Installing the Expat XML parser

The Axis cpp binary uses Expat as the XML parser.You need to download the Expat-1.95.7 binary version from http://sourceforge.net/projects/expat/
Extract the Expat binaries to a folder Called Expat ,we will refer this folder as [EXPAT_EXTRACT].
Copy libexpat.dll file from [EXPAT_EXTRACT]\Libs to [AXIS_HOME]/libs/

10. Restart the apache web server. If you have done correctly apache server should start without giving any error.


apache 1.3.X :

It is recommended that apache 1.3.X be started as "apache -k start" on the command line

apache 2.X :

While testing the apache 2 module a problem was noted with the apache 2 web server, in that the webserver takes up about 98% of CPU time and the server does not even serve the startup page. The workaround for this is to start the apache web server as "apache -X" to make it run single threaded. While this is sufficient to test the apache 2 module this problem needs to be investigated further.

10. Open a internet browser and check http://localhost/axis. If the module has loaded properly then you should get the axis welcome page with a listing of deployed web services.

Installation with Simple Axis Server


STEPS:

1. Create a folder of your choice. We will call this folder as SIMPLE_AXIS_SERVER_FOLDER.

2. Unzip axis-c-1.1-win32.zip to a folder of your choice. Say this folder AXIS_EXTRACT.

3.Inside the extracted folder AXIS_EXTRACT you have a sub folder called deploy. Copy whole deploy folder to SIMPLE_AXIS_SERVER_FOLDER.

4. Rename copied "deploy" folder to "Axis". Lets say this folder to be AXIS_FOLDER.

5. Set environment variable AXIS_HOME to point to above folder.

6. Copy the exe SimpleAxisServer.exe from AXIS_EXTRACT/bin to the SIMPLE_AXIS_SERVER_FOLDER.

7. Copy the content of AXIS_FOLDER/libs to the SIMPLE_AXIS_SERVER_FOLDER.

8. Start the SimpleAxisServer by providing the port to which operate. (eg: c:\SimpleAxisServer>SimpleAxisServer 80)

Running provided samples

If Axis installation is a complete success, following sample web services and handlers have already been installed successfully.

You will find the built console applications at AXIS/c/bin directory. Following are the built .exe files.
1.base.exe
2.cbase.exe
3.doclitbase.exe
4.doclitgroupB.exe
5.groupB.exe
6.cgroupB


In order to run these samples you should have AxisClient.dll in the PATH environment variable or in the same directory where the client .exe is located.

You can run the provided client programs to confirm whether the Axis cpp sever and clients are working fine. To run this sample client applications you need to have the path to libexapt.dll in the "PATH" environment variable or libexapt.dll should be placed where the apache.exe is. Note: These sample clients are compiled with assumption that server is running at localhost port 80.

Using Visual C++ to play with provided samples.

In your AXIS_EXTRACT/samples folder you have the samples. If you are using Visual C++ you can open the workspace file for client applications AXIS_EXTRACT\c\samples\client\interoptests\interoptests.dsw and For Deployable webservices, AXIS_EXTRACT\c\samples\server\interoptests\interoptests.dsw and play with them. There are seven projects in the workspace.

Writing your web services and client applications using Axis C++.

For writing your own web services and client applications see the windows user guide.