Hi Marcus, You are using the deprecated configuration of Apache Rampart. Apache Rampart recommends policy based configuration. The latter option only works with policy based configuration. If you have the option of moving in to policy based configuration, following tutorials might help you.
Web Services Security with Apache Rampart - Part 1 (Transport Level Security) <http://wso2.org/library/3190> Understanding WS - Security Policy Language <http://wso2.org/library/3132> thanks, Nandana On Mon, Jul 6, 2009 at 7:29 PM, m4rkuz <m4r...@gmail.com> wrote: > > Hi Everyone, > > I'm trying to set username/password dynamically on my ws app I've googled a > lot and find some workarounds but the only one that has worked for me > contains deprecated code, and used a password call back handler that really > mess with what i want to do, this is the code: > > * **OutflowConfiguration outflowConfig = new OutflowConfiguration();* > * > * > * **outflowConfig.setActionItems("UsernameToken");* > * > * > * **outflowConfig.setUser("username");* > * > * > * **outflowConfig* > * **.setPasswordCallbackClass("com.xxx.xxx.security.PWCBHandler");* > * > * > * **outflowConfig.setPasswordType("PasswordText");* > * > * > * ** > _serviceClient.getOptions().setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, > ** **outflowConfig.getProperty());* > > > This works like a charm but I have to search for the username/password in > base of some parameters I won't have available in the PWDCBHandler class, so > what I'm looking for is a way to set the password directly w/o using a > password call back handler. > > About this I've found some code that claims to do so: > > * **_serviceClient.getOptions().setUserName("15374159");* > * ** * > * ** _serviceClient.getOptions().setPassword("admin123");* > > but it''s not working for me... > > Any Ideas? > > I would really appreciate your input, > > > Thanks in advance, > > > ___________________________ > Marcus Sánchez Díaz. > Enterprise Developer. > SCJP - SCWCD. > SCDJWS on going... > -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/ http://www.wso2.org