This document describes how to install Apache Axis C++. It assumes you already know how to write and run C++/C code and not scared away by XML. You should also have familiarity with Web servers. This version of Axis C++ is tested on Apache web server.
It needs a few helper libraries, for logging, WSDL processing and introspection. You need to have following in order to run Axis C++ engine.
We tested with the following
Downloading the source or binary from the mirror site and setting the environment variables
You can download the Axis C++ source or binary from one of the apache mirror siteshttp://ws.apache.org/axis/cpp/download.html
Your downloaded distribution is axis-c-src-1_0-linux.tar.gz. After you extracting it for example as, /home/axisuser/projects/axis-c-src-1_0-linux you can rename it as axis_c
You have to set the environment variable $AXISCPP_HOME to the directory where you extracted the tar ball.. We further assume that the user dose the installation and has the linux user account axisuser. For example I have my <AXISCPP_HOME> as following.
/home/axisuser/projects
You can get expat from the uri http://sourceforge.net/projects/expat/
You have to follow the expat installation guide to install it
Get the apache downloadable software. (We used the source apache_1.3.27.tar.gz). Build it with sharable module support.
$ ./configure --enable-module=so
Note:- Here "so" is simple letters
$ make
$ make install
Starting the Apache server
$ usr/local/apache/bin/apachectl start
Stopping the Apache Server
$ usr/local/apache/bin/apachectl stop
Create an environment variable called AXISCPP_HOME.
$ cd /home/axisuser
[axisuser@localhost axisuser]$ vi ./.bash_profile
AXISCPP_HOME="/home/axisuser/projects/axis_c"
export AXISCPP_HOME
Save it and back in the terminal window.
$ source ~/.bash_profile
Verify the above change had been correctly effected by typing
$ echo $AXISCPP_HOME
Copy apache include files
$ cp -f <apacheinstdirectory>/include/* $AXISCPP_HOME/include/apache1_3/
Copy the expat include files$ cp -f <expatinstdirectory>/lib/expat.h $AXISCPP_HOME/include/expat/
$ cd $AXISCPP_HOME
The Folder called deploy in the $AXISCPP_HOME/ should be copied to apache
root folder .Rename the deploy folder as "Axis" . Give all permissions to
this folder.
$ cp -rf $AXISCPP_HOME/deploy /usr/local/apache
$ cd /usr/local/apache
$ mv deploy Axis
$ chmod -R 777 Axis
Now set the environment variable AXIS_HOME pointing to this directory.
AXIS_HOME="/usr/local/apache/Axis"
set EXPAT_HOME="<Your expat installation root folder>"
set LD_LIBRARY_PATH="$EXPAT_HOME/lib:AXISCPP_HOME/bin" (do this in your ./.bash_profile)
set XERCES_HOME="<Your xercesc installation root folder>"
set LD_LIBRARY_PATH="$XERCESC_HOME/lib" (do this in your ./.bash_profile)
cp -rf $XERCESC_HOME/include/xercesc/* $AXISCPP_HOME/include/xercesc/
cd $AXISCPP_HOME/src/soap
cp -f Makefile.am_xercesc Makefile.am
cd $AXISCPP_HOME/src/wsdd
cp -f Makefile.am_xercesc Makefile.am
in $AXISCPP_HOME/configure.ac
comment expat related things and uncomment xercesc related
things as described in it.
for samples
in $AXISCPP_HOME/samples/client/configure.ac
comment expat related things and uncomment xercesc related
things as described in it.
To Build from the Axis C++ source execute these.
$cd $AXISCPP_HOME/
$ sh autogen.sh
$ sh runconfig
$ make
$ make install
Also now there is no need to seperately build client side and
server side. When start running build.sh it will lookafter everything.
-----------------------------------------------------------------------
in $AXISCPP_HOME/configure.ac
comment
AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/engine/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/server/Makefile src/server/apache/Makefile)
and uncomment
#AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/engine/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/server/Makefile src/server/apache2/Makefile)
in $AXISCPP_HOME/src/server/Makefile.am
change SUBDIRS = apache to SUBDIRS = apache2cd /usr/local/apache/libexec (If apache2 /usr/local/apache2/modules)
cp -f $AXIS_HOME/deploy.sh_apache ./deploy.sh
sh deploy.sh
-----------------------------------------------------------------
Now libaxiscpp_mod.so (If you built for apache2 this is libaxiscpp_mod2.so) should have been created in $AXISCPP_HOME/bin directory. Note:- you can give the install path inside the runconfigure script.
Now you need to edit /usr/local/apache/conf/httpd.conf
$ vi /usr/local/apache/conf/httpd.conf
At the bottom of the file you have to include following lines and save it.
LoadModule axis_module libexec/libaxiscpp_mod.so (in apache2 replace libexec with modules and libaxiscpp_mod.so with libaxiscpp_mod2.so)
<Location /axis>
SetHandler axis
</Location>
Copy $AXISCPP_HOME/bin/libaxiscpp_mod.so into /usr/local/Apache/libexec/ (in apache2 replace libexec with modules and libaxiscpp_mod.so with libaxiscpp_mod2.so)
$cp -f $AXISCPP_HOME/bin/libaxiscpp_mod.so /usr/local/apache/libexec (in apache2 replace libexec with modules and libaxiscpp_mod.so with libaxiscpp_mod2.so)
Restart apache
If you have done installation successfully it will display the Axis C++ welcome page when you point to URI http://localhost/axis .
Deploying a Web Service Using InteropBase.wsdl
You can deploy your own web service or the sample webservices with the guidance in the userguide
WSDL2Ws tool must run on a jvm.