![]() Installing and deploying web applications using xml-AxisC++ |
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.
For more details on using Axis C++, please see the user
guide..This will instruct you how to install Axis C++ on Linux and Windows
It needs a few helper libraries, for logging, WSDL processing and introspection. You need to have following in order to run Axis C++ engine.
·
XercesC
.·
Apache We tested with the following
·
Redhat Linux 8.0(2.4.18-14) RedhatLinux9.0(2.4.20-8)What You need
Installation On Linux
· Apache 1.3 [apache_1.3.27.tar .gz, apache_1.3.28.tar.gz)] (Source)
· Xerces C++ [xerces-c-src2_2_0.tar.gz](Source) >(Source)
User can download the Axis C++ source or binary from one of the apache mirror sites
Your downloaded distribution is axis-c-src-alpha-linux.tar.gz. After you extracting it for example as, /home/axisuser/projects/axis-c-src-alpha-linux you can rename it as axis_c
The directory where you extracted the tar ball will be called <axiscpphome> from now on. We further assume that the user dose the installation and has the linux user account axisuser. For example I have my <axiscpphome> as following.
/home/axisuser/projects
You can get the Binary Version and the Source Version of xercesc2_2_0 from the uri www.xerces.org
If it is source you need to follow the xerces_c Installation guide documentation.(warning: This must be strictly followed. Otherwise if you type usual configure,make, make install, it may not work.)
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" are 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_HOMECopy xerces_c include files
$ cp -fCopy the xercesc libraries
$ cp -f <xercesinstdirectory>/lib/* /usr/lib/Copy apache include files
$ cp -f <apacheinstdirectory>/include/* $AXISCPP_HOME/include/apache1_3/ $ cd $AXISCPP_HOMETo Build from the Axis C++ source execute these.
$
sh autogen.sh $ sh runconfig $ make $ make install
Now libaxiscpp_mod.so should have been created in $AXISCPP_HOME/bin directory. Note:- you can give the install path inside the runconfigure script.There will be link errors if you don't use correct version of xerces-c.
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 <Location /axis> SetHandler axis </Location>
Copy /home/axisuser/projects/axis_c/bin/libaxiscpp_mod.so into
/usr/local/Apache/libexec/
$cp -f /home/axisuser/projects/axis_c/bin/libaxiscpp_mod.so /usr/local/apache/libexec
Restart apache.
If you have done installation successfully it will display the Axis C++ welcome page when you point to URI http://localhost/axis.
You can deploy your own web service or the sample webservices with the guidance in the userguide
WSDL2Ws tool must run on a jvm.