Hi, I have a web service client that ran perfectly under Axis2 (stub generated using ADB bindings) until the provider (not under my control) added WS-Security and now requires username/password auth. I have tried with little success to integrate Rampart into our set-up.
What I did, piecing things together from various how-tos:
1. Added all the rampart jars to the classpath
2. Created a client Axis2 repository (I didn't have one of those before)
containing conf/, services/ and modules/
3. Put the two .mar files in /modules
4. Created an axis2.xml config file in conf/ (attached)
5. Added the following around my stub creation code:
final ConfigurationContext ctx = ConfigurationContextFactory.
createConfigurationContextFromURIs(null, clientRepo);
final OpenPvsServiceStub openPvs = new OpenPvsServiceStub(ctx,
serviceAddress);
final ServiceClient sc = openPvs._getServiceClient();
sc.engageModule("rampart");
final Options options = new Options();
options.setUserName("[email protected]");
options.setPassword("xxxxxxxxx");
sc.setOverrideOptions(options);
This causes:
org.apache.axis2.AxisFault: Unable to engage module : rampart
Any ideas would be greatly appreciated.
Regards,
Stephanos Piperoglou
Price Control
GTO - BAC IT
+44 20 754 59007
This mail is transmitted to you on behalf of the Great East London
Software Company
Diese Post wird Ihnen im Namen der Great East London Software Company
übermittelt
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and delete this e-mail. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional
EU corporate and regulatory disclosures.
axis2.xml
Description: Binary data
