User login

How does Axis2 load modules from the classpath?

Story :

Project :

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

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
5
Average: 5 (1 vote)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

No Control Over Mar Location

Suppose I have, for legal and engineering reasons, no control over where the addressing mar ends up on the client system, but I do know where it will be. In fact, in my case, I know the mar will be in a subfolder of the directory that contains the axis2 jars. Is there any way then to engage addressing (or any module for that matter) given their differing locations working entirely in java code (meaning I can't create or distribute an axis config or other directories or files)?

No Control Over Mar Location

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.