This document provides instructions for using and extending the ANT based build for the AXIS C++ project.
To use the ANT based build you will need to install the following:
[ANT INSTALL DIR]/lib.Axis Cpp Developers use the Xerces-cXML Parsers to build the Axis Cpp. Additionally, you can opt to build Apache mod files for Apache 1.3 or 2.0.
Xerces-C XML Parser
You can get Xerces-C binaries from http://xerces.apache.org.
Apache
You can get Apache 1.3 or 2.0 from http://httpd.apache.org/
The behaviour of the ANT scripts is controlled by the values specified in build.common.properies. To aid in the portability of the ANT scripts, there are also a number of platform specific property
files which override properties as required. The ANT scripts will automatically determine the correct file to be used based on the
platform in which it is currently running. The property files are found
in ws-axis/c/build with the following naming convention:
build.common.properties
build.[platform].properties
A number of example property files are provided for Windows, Linux, AIX and Solaris. It is intended you update these files to suit your development and build environment, including location of third party software dependencies and target packaging structure.
These property files also allow you to make some selection on which artefacts will be produced by the build:
server.apache13server.apache20server.simpleAxisServer
The default selections are for both the Apache 1.3 and Apache 2.0 modules.
Before running ANT the following environment variables must be set:
ANT_HOME - location of ant installationJAVA_HOME - location of java installationPATH - to include [ANT_HOME]/bin and [JAVA_HOME]/bin.
The default property files make use of the following environment variables to locate the various third party software dependencies.
AXISJAVA_LIB - location of Axis Java JAR files, as required for WSDL2Ws toolXERCES_HOME - location of Xerces installationAPACHE_HOME - location of Apache 1.3 installation (if
building Apache 1.3 module)APACHE2_HOME - location of Apache 2.0 installation (if
building Apache 2.0 module)See here for more detail on gaining access to the code in SVN.
Note: The ANT scripts were written based on the previous CVS structure and have not been updated to the SVN structure, so you will need to ensure your checkout is into the following structure:
[build root]\ws-axis\c
The checked out folder ws-axis\c will be referred to as [CHECKOUT_HOME]
from this point on.
Once you have configured your environment and property files the build is a simple two step process. The first step is to build all the generated artefacts. At the comment prompt change to [CHECKOUT_HOME] and run:
ant
This will build the following:
The second step is to package the generated artefacts. From [CHECKOUT_HOME] run:
ant -f package.xml
This will package into two distributables:
By default, the ANT build scripts do not produce libraries with trace or debug symbols. To include these make use of one of the following to build:
ant buildWithTrace
ant buildWithDebug
ant buildWithTraceAndDebug
The packaging step remains the same, but when packaging the source distributable it will automatically select the trace instrumented source code if available.
When trace is selected, the ant build adds in trace entry and exit
statements into many of the methods in Axis C++. Then at runtime, in
axiscpp.conf, set ClientLogPath to a file and
Axis C++ will write out trace to that file. Omitting ClientLogPath from
axiscpp.conf switches trace off.
The AXIS community would greatly appreciate your input, if you're
working on a platform not currently supported by the ANT scripts.
Below, are the steps required to add an additional platform;
pre-init target in buildIntialize.xml, eg:
<condition property="linux">
<os name="Linux"/>
</condition>
initialize target in buildIntialize.xml,
eg:
<condition property="platform" value="Linux">
<isset property="linux"/>
</condition>
ws-axis/c to
match your platform. This uses the naming convention build.[platform].properties,
where platform is as specified in step 2.compiler definition for platform in buildIntialize.xml, include a
condition check for the correct platform and any debug flags should be conditional on the debug property being set, eg:
<compiler id="Linuxgcc" name="g++" if="linux">Note: Compilers may extend one another, which can be useful if an additional platform uses the same compiler, but maybe only small variations in the parameters.
<compilerarg value="-g" if="debug"/> <compilerarg value="-Wall"/>
<compilerarg value="-Wshadow"/>
<compilerarg value="-O2"/>
<defineset>
<define name="ENABLE_AXIS_EXCEPTION"/>
<define name="HAVE_CONFIG_H"/>
<define name="PIC"/>
</defineset>
<includepath path="${dir.include}"/>
</compiler>
linker definition for platform in buildIntialize.xml, include a
condition check for the correct platform and any debug flags should be conditional on the debug property being set, eg:
<linker id="LinuxLinker" name="g++" libtool="true" if="linux">Note: As for compilers, linkers may extend one another.
<linkerarg value="-g" if="debug"/>
<libset libs="stdc++"/>
</linker>
compiler and linker to the various cc
tasks used within the ANT scripts, eg:
<cc outfile="${dir.bin}/${transportLibraryName}" objdir="${dir.objects}"
exceptions="true" failonerror="false" outtype="shared" multithreaded="true">
<!-- Compilers -->
<compiler refid="Linuxgcc"/>
<compiler refid="AIXxlc"/>
...
<!-- Linkers -->
<linker refid="LinuxLinker"/>
<linker refid="AIXLinker"/>
...
</cc>