Hi,
I have two web-services:
A uses rampart for security communication.
B calls the A.
I use following code for calling the A from the B:
public int method() throws Exception {
ConfigurationContext ctx =
ConfigurationContextFactory.createDefaultConfigurationContext();
SecureServiceStub stub = new SecureServiceStub(ctx,
"https://localhost:8443/axis2/services/SecureService");
ServiceClient sc = stub._getServiceClient();
sc.engageModule("rampart"); (*)
Options options = sc.getOptions();
options.setUserName("login");
options.setPassword("password");
int a = 3;
int b = 4;
return stub.add(a, b);
}
The problem locates in (*). There is an exception: "Unable to engage
module: rampart".
I putted all depended jars to axis2/WEB-INF/lib and all mars to
axis2/WEB-INF/modules. I wrote also names of mars to modules.list.
Why there is a problem?
Thank you.