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...