Current user from java service [invoked from web service]???

Hello,

I have simple webservice that calls a java service. The problem is from the java service I’m trying to find out what user has called the webservice. I have tried the following code, but keeps returning ‘Administrator’ no matter who I login as ???

Session session = Service.getSession();
User currentUser = session.getUser();
IDataUtil.put( pipelineCursor, “userName”, currentUser.getName() );

I’m really confused by this. Is there everybody who can help me on this on?

Thanks
Q

How is the webservice consumer authenticating when they post their SOAP message to the IS soap processor (default, rpc or custom)? My guess is that they are using basic authentication with the Administrator user (and probably the default password).

If so, that tells IS that the consumer of the web service is Administrator 100% of the time. If you want to identify users differently, you can have them authenticate using unique credentials or you can assert user identify in the soap message itself using something like a WS-Security UsernameToken in the soap message header.

Mark

Thank you for your response Mark. You are correct in assuming I’m using basic authentication, however I have tried authenticating using accounts other than Administrator. This is why I’m confuss as to why wm still thinks the user is Administrator. Shouldn’t it be the same user as who authenticated using the web service?

I should also mention I’m using wm 6.1