Hi,
my aim is to create web service form the portal service, I have to access the all pages navigational URL for particular Role. I have implemented already this logic in my Web Dynpro application but now I have to make web Service which is going to implement the same logic.
So what I am doing is I get the user as parameter then I check the Roles for user and then one by one I do lookup on uniqueRolename to get the IPcdContext then I pass the IPcdContext to another function which will then look for PagesURL.
Ok now before I use lookup I have to assign the user in Context environment I have done like this
InitialContext ic = new InitialContext(environment);
IUserFactory uf = UMFactory.getUserFactory();
IUser admin = uf.getUserByUniqueName("admin");
ic.addToEnvironment(Context.SECURITY_PRINCIPAL,admin);
But when it add admin in the enviorment it throws NamingException , I do not know what to do what this is there any other way?
Best Regards
Yasir Noman