Apache | WS |
Axis C++ Linux Installation GuideInstalling and deploying web applications using xml-AxisC++Contents
IntroductionThis 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 What You needIt needs a few helper libraries, for logging, WSDL processing and introspection. You need to have following in order to run Axis C++ engine.
Installation On LinuxWe 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 sites http://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/axis_c Installing XercescYou 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.) Installing ApacheGet 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 Installing Axis C++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 xerces_c include files $ cp -f <xercesinstdirectory>/include/xercesc/* $AXISCPP_HOME /include/xercesc/ Copy the xercesc libraries $ cp -f <xercesinstdirectory>/lib/* /usr/lib/ Copy apache include files $ cp -f <apacheinstdirectory>/include/* $AXISCPP_HOME/include/apache1_3/ (if apache2.0 do accordingly) $ cd $AXISCPP_HOME To Build from the Axis C++ source execute these. $ sh autogen.sh $ sh runconfig $ make $ make install
----------------------------------------------------------------------- NOTE: If you use apache2.0 following two small changes has to be done in $AXISCPP_HOME/configure.ac and $AXISCPP_HOME/src/server/Makefile.am)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 = apache2 ----------------------------------------------------------------- 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.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 (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 Validating The InstallationIf 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. |