Apache Axis2/C engine uses a client repository to load its libraries, modules and services. Generally user has to specify this repository using AXIS2C_HOME environment variable. Rather than having all (libraries, modules and services) in one directory, user can specify them using axis2.xml. Dinesh Premalal, explains..
Table of Content
- Additional Parameters [0]
- Server Side [0]
- Client Side [0]
Applies To
| Environment | Axis2/C 1.3.0 |
Additional Parameters
There are three additional parameters we have to specify in axis2.xml. These "parameter" elements need to add to axis2.xml as children of "axisconfig" element.
-
libDir
This parameter has a pointer to the directory which contains the Axis2/C libraries.
<parameter name="libDir">/home/dinesh/axis2c/deploy/lib</parameter>
-
servicesDir
This parameter has a pointer to the directory which contains Axis2/C services. To load services we need to specify this parameter:
<parameter name="servicesDir">/home/dinesh/axis2c/deploy/services</parameter>
-
moduleDir
The directory that contains module libaries is pointed by this parameter:
<parameter name="moduleDir">/home/dinesh/axis2c/deploy/modules</parameter>
Server Side
On the server side, axis2.xml can be used in two ways instead of Axis2/C repository.
-
Using AXIS2C_HOME environmental variable
Use path to axis2.xml file instead of Axis2/C repository directoty, for AXIS2C_HOME environmental variable. Then, Axis2/C engine will be able to pick up the libraries, services and modules using above mentioned parameters:
export AXIS2C_HOME=/home/dinesh/axis2c/deploy/axis2.xml
-
"-r" option in axis2_http_server
Use an option in axis2_http_server
$./axis2_http_server -r /home/dinesh/axis2c/deploy/axis2.xml [other options]
NOTE: This method is not yet tested with mod_axis2, therefore might not work with it.
Client Side
On the client side too user has two ways of specifying axis2.xml, instead of a repository directory
-
Using AXIS2C_HOME environmental variable
Use path to axis2.xml file, instead of Axis2/C repository directory, for AXIS2C_HOME environmental variable and then Axis2/C engine will be able to pick up libraries, services and modules using above mentioned parameters.
-
Using Client API
One could even use client api to specify axis2.xml file path:
client_home = "/home/dinesh/axis2c/deploy/axis2.xml" /* Create service client */ svc_client = axis2_svc_client_create(env, client_home);
Author
Dinesh Premalal, Senior Software Engineer, WSO2 Inc. dinesh AT wso2 DOT com