cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the username/password of logged user so to use web services

Former Member
0 Kudos

Hi Experts,

we are using web services from a web dynpro application, the web services we use are CAF web services; actually we are "hardcoding" username and password so to be able to execute these web services, using this code before calling the web service:

wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"testuser");
  wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"testpassword");

but as this is not a very good practice, we want to replace the "testuser" with the logged user and, of course, retrieve the password and use it instead of "testpassword".

How can we achieve this? I couldn´t find any tips on this.

Best regards,

Marco.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check if it helps

/thread/1296226 [original link is broken]

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

after finding more info in SDN, I´ve found the solution:

the best way to use Web Services without dealing with user names, and passwords (using SSO) is to use Web Service Destinations, they have to be configured via the Visual Administrator.

Best regards,

Marco.

Former Member
0 Kudos

Hello,

thanks for your anwsers, although I´ve followed both links I couldn´t find the answer to my problem.

I need to know how to retreive user and password from the UME of the portal so to be able to execute web services in the java stack, the UME is connected to a LDAP in our corporation.. so may be the passwords are not stored in the UME?

If it is not possible to retrieve the passwords of the users , which is the best practice to deal with username/passwords to execute CAF webservices from web dynpro java? Hardcoding is not a very good practice..

Best regards,

Marco.

former_member185086
Active Contributor
0 Kudos

Hi

Please follow the given [link|;, which contains exact solution to your problem.

Best Regards

Satish Kumar