Axis C++ Windows Installation Guide

Axis C++ Windows Installation Guide

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

What binary distribution contains
Installation with Apache 1.3.x/2.x web server
Installation with Simple Axis Server
Running Provided Samples
Using Visual C++ to play with provided samples.
Writing your web services and client applications using Axis C++.
Installing the Expat Parser

Note:The Expat XML Parser module is not currently maintained and also contains some bugs. So it is removed from the 1.4 release. Please ignore any references to the Expat parser in the documentation. The documentation will be updated regarding this later.

Installing the Xerces Parser

What binary distribution contains

1. The binary distribution contains the following folders
-> bin
-> deploy
-> docs
-> include
-> lib
-> samples

2.The folder “bin” contains sample clients and other dlls which are needed to run the Axis c++ server

3.Inside the "deploy" folder following sub folders exist
-> conf (This includes the server.wsdd, which is the deployment descriptor used for deploying services.)
-> handlers (This includes sample handler dlls)
-> libs (Contains dlls which are needed by axis.)
-> logs (Directory for logs)
-> webservices (Contains sample web services that can be deployed with Axis C++)
-> wsdls (Contains sample wsdls)

4. The "include" folder contains all the include files which are necessary for building Axis c++ clients.

5. "lib" folder contains jars needed to use the wsdl2ws tool.

6. "samples" folder contains sources of all the server and client samples including interop tests.

Installing the Expat XML parser

Note:The Expat XML Parser module is not currently maintained and also contains some bugs. For more information refer the contents section.

If you decide to use the Expat parser you need to install the Expat parser. 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 to this folder as [Expat_Folder].



Installing the Xerces XML parser


If you decide to use the Xerces parser you need to install the Xerces parser. Download the Xerces-C 2.2.0 ( 32 bit binary release) from: http://xml.apache.org/xerces-c/download.cgi

Extract the Xerces-C 2.2.0 binary version. We will refer to this folder as [Xerces_Folder].

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

Steps:

1. Install apache web server and locate the installation folder(For the default installation (apache 1.3.X) the path is "C:\Program Files\Apache Group\Apache" and for apache 2.X the path is "C:\Program Files\Apache Group\Apache2" ). Lets say this folder is [Apache_Folder].

2. Unzip the binary distribution to a folder of your choice. Say this folder is Axis_Extract.

3. Inside the extracted folder Axis_Extract there is a sub folder called deploy. Copy the whole deploy folder to [Apache_Folder].

4. Rename copied "deploy" folder to "Axis". Lets say this folder is [Axis_Folder].

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

6. Add [Axis_Folder]/lib to the PATH environment variable.

7. Add the following lines to the bottom of Apache configuration file httpd.conf located in [Apache_Folder]/conf

LoadModule axis_module modules/[Axis_Module]
<Location /axis>
SetHandler axis
</Location>

[Axis_Module] is either mod_axis.dll for apache 1.3.X or mod_axis2.dll for apache 2.X.

8. Copy [Axis_Module] from Axis_Extract/bin folder to [Apache_Folder]/modules folder.

9. Copy AxisServer.dll and AxisTransport.dll from Axis_Extract/bin folder to [Axis_Folder]/lib

10.If you want to use the Expat parser with Axis C++, rename AxisXMLParser_Expat.dll (which is located at Axis_Extract/bin ) to AxisXMLParser.dll and copy it to [Axis_Folder]/lib
Note:The Expat XML Parser module is not currently maintained and also contains some bugs.For more information refer the contents section.

11.If you want to use the Xerces parser with Axis C++, rename AxisXMLParser_Xerces.dll (which is located at Axis_Extract/bin ) to AxisXMLParser.dll and copy it to [Axis_Folder]/lib


  • Copy libexpat.dll file from [Expat_Folder]\Libs to [Axis_Folder]/lib/
  • Copy xerces-c_2_2_0.dll from [Xerces_Folder]/bin/ to [Axis_Folder]/lib/


Note: This could also be done by editing the axiscpp.conf.
12. Open the [Axis_Folder]/axiscpp.conf_win for editing. The contents of the file will look as follows.

LogPath:XXXX
WSDDFilePath:YYYY
XMLParser:ZZZZ
Transport_http:AAAA

XXXX is the path to a file named AxisLog (The log file)and YYYY is the path to the server.wsdd file. Give the appropriate values for XXXX and YYYY as follows.ZZZZ is the path to the XMLParser and AAAA is the path to the Transport used.

i.e.

LogPath: [Apache_Folder]\Axis\logs\AxisLog
WSDDFilePath: [Apache_Folder]\Axis\conf\server.wsdd
XMLParser:[Apache_Folder]\Axis\lib\AxisXMLParser.dll
Transport_http:[Apache_Folder]\Axis\lib\AxisTransport.dll

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

Also in order to run the provided samples do the following.

Open server.wsdd for editing. For each service element, locate the element "parameter name", which has the value "classname".
Give the absolute path of the indicated webservice.dll in the "value" attribute

Rename axiscpp.conf_win which is in [Axis_Folder] to axiscpp.conf

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


apache 1.3.X :

It is recommended to start apache 1.3.X 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 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.

(However on a different machine, when I simply run the apache2 executable (version 2.0.49) without any arguments, as, "apache" on windows 2000 professional, service pack 5, with/without Axis C++ it seems to be working fine.

But in this machine the apache could not be started as "apache -k start" (i.e. as a service). It simply exists and does not start. The 98% CPU usage scenario cannot be reproduced in this machine.

It could happen with some other apache 2 versions or in different service packs. )

14. Open an internet browser and check http://localhost/axis If the module has loaded properly then you will 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 the binary distribution to a folder of your choice. Say this folder is Axis_Extract.

3. Inside the extracted folder Axis_Extract there is a sub folder called deploy. Copy the whole deploy folder to Simple_Axis_Server_Folder.

4. Rename copied "deploy" folder to "Axis". Lets say this folder is [Axis_Folder].

5. Set environment variable AXISCPP_DEPLOY to point to above [Axis_Folder].

6. Add [Axis_Folder]/lib to the PATH environment variable.

7. Copy the SimpleAxisServer.exe from Axis_Extract/bin to the Simple_Axis_Server_Folder.

8. Copy AxisServer.dll and AxisTransport.dll from Axis_Extract/bin folder to [Axis_Folder]/lib

9.If you want to use the Expat parser with Axis C++, rename AxisXMLParser_Expat.dll (which is located at Axis_Extract/bin) to AxisXMLParser.dll and copy it to [Axis_Folder]/lib
Note:The Expat XML Parser module is not currently maintained and also contains some bugs.For more information refer the contents section.
10.If you want to use the Xerces parser with Axis C++, rename AxisXMLParser_Xerces.dll (which is located at Axis_Extract/bin) to AxisXMLParser.dll and copy it to [Axis_Folder]/lib

11.If you are using Expat parser then copy libexpat.dll from [Expat_Folder]/Libs and paste it in [Axis_Folder]/lib.

If you are using Xerces parser then copy xerces-c_2_2_0.dll from [Xerces_Folder]/bin and paste it in [Axis_Folder]/lib.

Note: This could also be done by editing the axiscpp.conf.
12. Open the [Axis_Folder]/axiscpp.conf_win for editing. The contents of the file will look as follows.

LogPath:XXXX
WSDDFilePath:YYYY
XMLParser:ZZZZ
Transport_http:AAAA

XXXX is the path to a file named AxisLog (The log file)and YYYY is the path to the server.wsdd file. Give the appropriate values for XXXX and YYYY as follows.ZZZZ is the path to the XMLParser and AAAA is the path to the used Transport.

i.e.

LogPath: [Apache_Folder]\Axis\logs\AxisLog
WSDDFilePath: [Apache_Folder]\Axis\conf\server.wsdd
XMLParser:[Axis_Folder]\lib\AxisXMLParser.dll
Transport_http:[Axis_Folder]\lib\AxisTransport.dll

Rename axiscpp.conf_win to axiscpp.conf.

13. Start the SimpleAxisServer by providing the port to which it operates.(eg: c:\SimpleAxisServer>SimpleAxisServer 80)

Note:If SimpleAxisServer does not start then paste AxisClient.dll to the place where SimpleAxisServer.exe is.

Also in order to run the provided samples do the following.

Open server.wsdd for editing. server.wsdd is located at [Axis_Folder]\conf\ rename the wsdd file of your platform to server.wsdd. For each service element, locate the element "parameter name", which has the value "classname".
Give the absolute path of the indicated webservice.dll in the "value" attribute

14. Restart the SimpleAxisServer.If you have done correctly then SimpleAxisServer will start without giving any error.

Running Provided Samples

If Axis installation is a complete success, then the following sample web services and handlers have been installed successfully. Please click on the following link to see the deployed web services. http://localhost/axis

You will find the built console applications at [Axis_Extract]/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.exe

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 server and clients are working fine.

To run these sample client applications you need to have the path to libexpat.dll in the "PATH" environment variable or libexpat.dll should be placed where the apache.exe is.(libexpat.dll can be found in [Expat_Folder]\libs)

Note: These sample clients are compiled with the 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 which are in Axis_Extract\c\samples\client\interoptests\interoptests.dsw

Deployable webservices are in Axis_Extract\c\samples\server\interoptests\interoptests.dsw and you can 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