on 08-03-2005 7:38 AM
Hi all,
I was trying to get the information of a user logged on to a portal.I used the following code.
IWDClientUser clientuser = WdClientUser.getCurrentUser();
Iuser user = clientuser.getSAPUser();
String username = user.getUniqueName();
String uniqueID = user.getUniqueId();
WDContext.currentContextElement.setUserName(username);
WDContext.currentContextElement.setUniqueId(uniqueID);
This username and UniqueID are displayed in a textview .
I created a WebDynpro iView based on this application. I created a system for the Web Application Server on which my application is deployed.Instead of "Single Sign On" I'm using User Mapping.
The problem is my application always gives
username=Administrator
uniqueID=USER.PRIVATE_DATASOURCE.un:Administrator,even if I logon to portal with a different username.
I had done usermapping using the Web application Server's administrator's userID and password.Even if I do usermapping with a different user the result is the same.
Is this the problem due to usermapping and which administrator is the application showing WAS or Portal.
Can anyone help me out?
Hi
I am also using the same code for same purpose.But I am not able to deploy my application. I am getting a warning as :
The referenced application ''sap.com/com.sap.portal.usermapping'' can''t be started.
Check the causing exception for details. Hint: Is the referenced application deployed correctly on the server?
Can you please help me ..
Archana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
could u just help me out in LDAP connectivity
actually we have to use user-information in a web dynpro application ...
so do we have to install a portal server also to do the LDAP connectivity or can we do it directly from web dynpro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep
Is your WAS(Where Webdynpro Components are deployed) and EP are running in two different servers? If this is the case you cant get the Userid from the above code.
If you want the details of the User logged, Write a Portal service and expose the same as Webservice. Consume this webservice in Webdynpro.
Regards
NagaKishore V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi NagaKishore,
I have been trying to establish single sign on between my portal server and the Web application server.But I'm facing some problem.
My portal server is generating the ticket for the user but the Web AS is not able to receive the ticket.
Do you have any solution to this problem?
Regards
~Pradeep Shetty
hi pradeep,
the code to get the current user from portal, is like this
i suppose
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
if (user != null)
{
IUserAccount[] acct = user.getUserAccounts();
if(acct[0] != null)
{
String strUserid = acct[0].getLogonUid();
}
}
now create an SAP webdynpro iview based on this project. give the system as SAP_local which is the default system for webdynpro applications.no need of creating a system explicitly or performing usermapping.
regards,
rahul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.