This document guides you on how to install Axis2/C, and run the server and client samples on Linux and Microsoft Windows operating systems.
This release comes in two forms, source and binary and you can download them from here. This document covers both forms.
Please send your feedback to the developer mailing list: c-dev@axis.apache.org (Subscription details are available on the Axis2 site.) Please remember to prefix the subject with [Axis2].
(a) libxml2 - http://www.xmlsoft.org/
(b) libiconv - http://www.gnu.org/software/libiconv/
(c) zlib - http://www.zlib.net/
(d) Apache Qpid -
(a) Extract the binary tar package to a directory.
(b) Set AXIS2C_HOME environment variable pointing to the location where
you have extracted Axis2/C.
$ AXIS2C_HOME='/your_path_to_axis2c'
$ export AXIS2C_HOME
NOTE : You will need to set AXIS2C_HOME only if you need to run Axis2/C
samples or tests. The reason is that the samples and test codes use
AXIS2C_HOME to get the path to Axis2/C. To write your own services or
clients this is not a requirement.
$ AXIS2C_HOME='/your_desired_path_to_axis2c_installation'
$ export AXIS2C_HOME
$ cd /your_path_to_axis2c_source
$ ./configure --prefix=${AXIS2C_HOME}
$ make
$ make install
$ ./configure --enable-guththila=yes [other configuration
options]
$ make
$ make install
$ export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib/
$ cd samples
$ ./configure --prefix=${AXIS2C_HOME}
--with-axis2=${AXIS2C_HOME}/include/axis2-1.7.0
$ make
$ make install
<transportReceiver name="amqp"
class="axis2_amqp_receiver">
<parameter name="qpid_broker_ip"
locked="false">127.0.0.1</parameter>
<parameter name="qpid_broker_port"
locked="false">5672</parameter>
</transportReceiver>
<transportSender name="amqp" class="axis2_amqp_sender"/>
$ cd ${AXIS2C_HOME}/bin
$ ./axis2_http_server
$ ./axis2_http_server -h
$
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
$ cd ${AXIS2C_HOME}/samples/bin
$ ./echo
$ ./math
$
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
$ cd ${QPID_HOME}/sbin
$ ./qpidd --data-dir ./
$ cd ${AXIS2C_HOME}/bin
$ ./axis2_amqp_server
$ ./axis2_amqp_server -h
$
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
$ cd ${AXIS2C_HOME}/sample/bin/amqp
$ ./echo_blocking
$
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
Please edit the <source_distribution>\build\win32\configure.in file to set the following build options. These are optional
The following steps will take you through the source compilation.
cd C:\axis2c\build\win32
C:\axis2c\build\win32> vcvars32.bat
Note: You may have to set the PATH environment variable to vcvars32.bat if MS Windows gives an error indicating that it cannot find this batch file. This file is located in <Your MS Visual Studio Install Directory>\VC\bin directory.
C:\axis2c\build\win32>nmake install
The deploy folder structure is as follows:
> cd %AXIS2C_HOME%\bin
> axis2_http_server.exe
$ ./configure --with-apache2="<apache2 httpd include
files location>" [other
configure options]
$ ./configure --with-apache2="<apache2 include files
location>" --with-apr="<apr include files
location>" [other configure options]
$ make
$ make install
cp $AXIS2C_HOME/lib/libmod_axis2.so.0.7.0
/usr/lib/apache2/modules/mod_axis2.so
(on Linux)copy C:\axis2c\build\deploy\lib\mod_axis2.dll
C:\Apache2\modules\mod_axis2.so
(on Windows)
You can add a string value with the name services_url_prefix
. This is optional and defaults to "/services".
As an example, if you have "/web_services" as the prefix, then all the
services hosted would have the endpoint prefix of :
http://localhost/axis2/web_services.
Note: don't forget the / at the begining.
If you wish, you can also change the location as well by adding a string value with the name axis2_location
. This is also optional and defaults to /axis2.
If you have /myserser as the value you can access your web services with a url like http://localhost/myserver/services.
Note: Don't forget the / at the beginning.
Now you can do all the registry editing using the JScript file axis2_iis_regedit.js provided with the distribution.
When you build axis2/C with the IIS module the file is copied to the root directory of the binary distribution.
Just double click it and everything will be set to the defaults. The axis2c_home is taken as the current directory, so make sure you run the file in the Axis2/C repository location (or root of the binary distribution). If you want to change the values you can
manually edit the the .js file or give it as command line arguments to the script when running the script. To run the jscript from the command line use the command :\cscript axis2_iis_regedit.js optional arguments
. We recomend the manual editing as it is the easiest way to specify the values.
IIS 5.1 or Below
Using the IIS management console, add a new virtual directory to your IIS/PWS web site. The name of the virtual directory must beaxis2
. Its
physical path should be the directory in which you placed
mod_axis2_IIS.dll (in our example it is
c:\axis2c\lib). When creating this new virtual directory, assign
execute access to it.
By using the IIS management console, add mod_axis2_IIS.dll as a filter in your IIS/PWS web site and restart the IIS admin service.
IIS 6 & 7
Using the IIS management console, add the mod_axis2_IIS.dll as a Wildcard Script Map.Please don't add the mod_axis2_IIS.dll as a filter to IIS as in the IIS 5.1 case.
Note: If the Axis2/C failed to load, verify that Axis2/C and its dependent DLLs are in the System Path (not the user path).
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
(Or some other directory of your choice)
<Directory /usr/local/apache/cgi-bin/>
Options +ExecCGI
</Directory>
AddHandler cgi-script .cgi
SetEnv AXIS2C_HOME <your path to axis2c home dir>
SetEnv AXIS2C_URL_PREFIX /private/scripts/axis2.cgi/