Here is RampartConfig which configures the client authenticator to use keystores (services.xml) <Service name="test"> <messageReceiver class="org.apache.rahas.STSMessageReceiver"/>
<!-- Action mapping to accept SCT requests --> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</actionMapping> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</actionMapping> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Renew</actionMapping> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Cancel</actionMapping> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel</actionMapping> <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate</actionMapping> </operation> <!-- Using the config file --> <parameter name="token-dispatcher-configuration-file">META-INF/token-dispatcher-configuration.xml</parameter> <!-- Configure Rampart to authenticate clients --> <wsp:Policy wsu:Id="SigOnly" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsp:ExactlyOne> <wsp:All> <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> <ramp:user>ip</ramp:user> <ramp:encryptionUser>useReqSigCert</ramp:encryptionUser> <ramp:passwordCallbackClass>PWCBHandler</ramp:passwordCallbackClass> <ramp:signatureCrypto> <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin"> <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property> <ramp:property name="org.apache.ws.security.crypto.merlin.file">META-INF/rahas-sts.jks</ramp:property> <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property> </ramp:crypto> </ramp:signatureCrypto> </ramp:RampartConfig> Martin Gainty ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > From: [EMAIL PROTECTED] > To: axis-user@ws.apache.org > Date: Fri, 15 Aug 2008 09:14:16 +0100 > Subject: RE: AXIS2 WS-Security > > Yes, you can do this programatically by using the policy based approach to > implement Rampart enabled services. There's a good tutorial on the topic at > [1]. Cheers. > > 1 - http://wso2.org/library/3190 > > Regards > Sanjay > > >-----Original Message----- > >From: Deep455 [mailto:[EMAIL PROTECTED] > >Sent: 15 August 2008 09:09 > >To: axis-user@ws.apache.org > >Subject: RE: AXIS2 WS-Security > > > > > >Thanks Sanjay > >Iam able to run the stanalone client using rampart libraries > >and mar file. > >Currently Iam using axis2 configuration file for username and password. > >Can I do this programatically with out using teh configuration file ? > >I have used outflowconfiguration below and its working fine. > >OutflowConfiguration ofc = new OutflowConfiguration(); > > ofc.setActionItems("UsernameToken"); > > ofc.setPasswordType(WSConstants.PW_TEXT); > > ofc.setUser("UserName"); > > > > > >options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,ofc.ge > >tProperty()); > > > > PWCBHandler myCallback=new PWCBHandler(); > > myCallback.setUser("userName"); > > myCallback.setPass("Password"); > > > >options.setProperty(WSHandlerConstants.PW_CALLBACK_REF, myCallback); > > > >BUt Outflowconfiguration seems to be depracted with rampart 1.3. > > > >How do I do this using RampartConfig class? > > > > > > > > > >-- > >View this message in context: > >http://www.nabble.com/AXIS2-WS-Security-tp18978756p18995269.html > >Sent from the Axis - User mailing list archive at Nabble.com. > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ See what people are saying about Windows Live. Check out featured posts. http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008