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

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++.
7. Installing the Xerces Parser

Note:The Expat XML Parser module is not currently maintained and also contains some bugs. So it is removed from the 1.5 release.

What binary distribution contains

The binary distribution extracts to a folder named axis-c-1-5-win32.
The sub folders in the binary distribution and their contents are listed in the table below:
Folder NameContents
binContains Axis C++ DLLs, the SimpleAxisServer executable and client sample executables
deploy Inside the "deploy" folder following sub folders can be found
-> conf (This includes the sample server.wsdd, which is the deployment descriptor used for deploying services, as well as the sample client.wsdd, which can be used to configure client side handlers.)
-> handlers (This includes sample handler dlls)
-> webservices (Contains sample web services that can be deployed with Axis C++)
-> wsdls (Contains sample wsdls)
The other folders are empty and you can ignore those.
docsAxis C++ documentation, including the API documentation.
includeContains header files, which are required for building web service specific generated stubs.
libContains AxisClient.lib and AxisServer.lib, which is required by the compiler when building web services. It also contains the wsdl2ws.jar which is the Java tool that can be used for C/C++ code generation using WSDLs.
samplesContains samples (clients and server in seperate folders) as well as a sample server.wsdd that can be used as the deployment descriptor to run the samples. There is a readme.txt as well.

Installing the Xerces XML 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,HTTPTransport.dll and HTTPChannel.dll from Axis_Extract/bin folder to [Axis_Folder]/lib

10.Rename AxisXMLParser_Xerces.dll (which is located at Axis_Extract/bin ) to AxisXMLParser.dll and copy it 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.
    11. 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
    Channel_HTTP:BBBB

    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 and BBBB is the path to the Channel 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\HTTPTransport.dll
    Channel_HTTP:[Apache_Folder]\Axis\lib\HTTPChannel.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

    12. 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. )

    13. 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. Download binaries Axis C++ binary from http://www.apache.org/dist/ws/axis-c/axis-c-win32-current-bin.zip
    Xerces binary from http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_2_0/xerces-c2_2_0-win32.zip

    2. Extract downloads
    Extract axis-c-win32-current-bin.zip to D:\axis-c-1-5-win32
    Extract xerces-c2_2_0-win32.zip to D:\xerces-c2_2_0-win32

    3. Copy Xerces lib to Axis C++ extract folder

    copy D:\xerces-c2_2_0-win32\bin\xerces-c_2_2_0.dll D:\axis-c-1-5-win32\bin
    

    4. Set Environment variables
    Open a command shell and run:
    set AXISCPP_DEPLOY=D:\axis-c-1-5-win32
    set PATH=%PATH%;%AXISCPP_DEPLOY%\bin
    

    5. Set up the configuration
    On the same shell used in step 4 run:
    cd %AXISCPP_DEPLOY%
    
    Now you should be on D:\axis-c-1-5-win32
    Copy the conf file:
    copy deploy\axiscpp.conf_win axiscpp.conf
    

    Edit the conf file to have the following content
    LogPath:D:\axis-c-1-5-win32\bin\AxisLog.txt
    WSDDFilePath:D:\axis-c-1-5-win32\samples\server.wsdd
    XMLParser:D:\axis-c-1-5-win32\bin\AxisXMLParserXerces.dll
    Transport_http:D:\axis-c-1-5-win32\bin\HTTPTransport.dll
    Channel_HTTP:D:\axis-c-1-5-win32\bin\HTTPChannel.dll
    
    NOTE: Please do not set Channel_HTTP_SSL in axiscpp.conf

    Now setup the server.wsdd file
    copy samples\server.wsdd.win32 samples\server.wsdd
    
    Edit server.wsdd file to match your settings (In this case replace all C:\obj\samples with D:\axis-c-1-5-win32\deploy\webservices)

    6. Run SimpleAxisServer On the same command shell used in steps 4 and 5
    bin\simpleaxisserver 9090
    

    7. Run clients Open a new command shell
    Set environment variables:
    set AXISCPP_DEPLOY=D:\axis-c-1-5-win32
    set PATH=%PATH%;%AXISCPP_DEPLOY%\bin
    

    cd to %AXISCPP_DEPLOY%
    And run the sample
    bin\base http://localhost:9090/axis/base
    

    Running Provided Samples

    You can find the samples in "bin" folder of the Axis C++ extract folder.
    To get help on how to run sample run : <sample executable name> [-?] -h]
    For more information on how to build samples using ant please see Axis C++ Samples Guide

    Using Visual C++ to play with provided samples.

    The VC++ projects are outdated. You can use ant scripts to buils the samples (please see Axis C++ Samples Guide)
    If you have some time to spare to create the project files, please contribute those to the project. , you are much enco

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

    For writing your own web services and client applications see the Windows User Guide

    PDF
    PDF