WSO2Con 2013 CFP Banner

How does Axis2 load modules from the classpath?

By Deepal Jayasingha
Date: Tue, 20th Jun, 2006
Level:
Reads: 9013 Discuss this article on Stack Overflow

Q :I want to use Axis2 an an embedded application. How do I do this as there is no repository?

Deepal Jayasingha

WSO2 Inc.
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 =
ConfigurationContextFactory.createConfigurationContextFromFileSystem
(“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:

foo
axis2-1.0.jar
addressing-1.0.mar

Applies To:

Apache Axis2/Java version 1.0
WSO2Con 2014