on 09-22-2011 1:45 PM
Hi All,
I have the below code in a web service for fetching the user.
IUser user = null;
Properties p = new Properties();
p.put("domain", "true");
ApplicationWebServiceContext wsContext = (ApplicationWebServiceContext) new InitialContext(p).lookup("/wsContext/" + ApplicationWebServiceContext.APPLICATION_WSCONTEXT);
if (wsContext != null) {
user =UMFactory.getAuthenticator().getLoggedInUser(wsContext.getHttpServletRequest(),null);
}uwlContext.setUser(user);
uwlContext.setLocale(user.getLocale());
I see that when deploying the wsContext is not null , and it enters the if loop. The problem is with the line shown below.
user =UMFactory.getAuthenticator().getLoggedInUser(wsContext.getHttpServletRequest(),null);
Any clue what the probelm is ?
Hi Vidya,
Try this :
user = WDClientUser.getCurrentUser().getSAPUser().getUniqueName();
IUser user = UMFactory.getUserFactory().getUserByLogonID(user);
Or
IUserFactory userfact = UMFactory.getUserFactory();
IUserMaint userMaint = userfact.getMutableUser(user);
Hope this helps.
Cheers-
Pramod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.