How does Axis2 load modules from the classpath?
By Deepal Jayasingha
- 20 Jun, 2006
A :The most common Use Case scenario is to create Apache Axis2 system using a repository. Therefore, once you have the repository you can create ConfigurationContext as follows:
ConfigurationContext conficContext =
(“repository”, “axis2.xml location”);
Note : The “repository” is a directory in the file system which has two sub directories called “services” and “modules”. In this case you want support of a module then you can drop that module into the modules directory of the repository. The idea of “repository” is perfectly valid in the server side since it requires to have services and modules in the server, but when it comes to client side there is no idea of services. Therefore, there's no need to have a repository. Although there is no need of repository, you have to have a way of engaging modules. So how is this done?
The solution is to drop modules into your class path !!! The concept of class path here has a restriction. You have to drop the modules into the same directory where you have your axis2 jar files. With this approach you can get the module version support as well.
Let's say that your axis2 jars are in a folder called foo in your class path, then you have to drop modules in to “foo” folder, in which case the folder hierarchy looks like below:
Apache Axis2/Java version 1.0