You should be able to do this much more simply by just adding the rampart.mar directly to your classpath. That way you can skip all the repository setup (including the ConfigurationContextFactory call) and just need to call engageModule("rampart"); in your code.

 - Dennis

--
Dennis M. Sosnoski
Java XML and Web Services
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117


Stephanos Piperoglou wrote:

Apologies, it seems the repository wasn't being picked up by the classloader.

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



*Stephanos Piperoglou <stephanos.piperoglou+exter...@db.com>*

28/01/2010 13:51
Please respond to
axis-user@ws.apache.org


        
To
        axis-user@ws.apache.org
cc
        
Subject
        Unable to engage module : rampart



        






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("stephanos.piperog...@db.com");
           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.[attachment "axis2.xml" deleted by Stephanos Piperoglou/ext/dbcom]


---

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.

Reply via email to