Closing this post as Found the solution.
Solution is simply to use following in your webservice method:
MessageContext msgCtx =
MessageContext.getCurrentMessageContext();
Vector results = (Vector)
msgCtx.getProperty(WSHandlerConstants.RECV_RESULTS);
String username =
((WSSecurityEngineResult)((WSHandlerResult)results.get(0)).getResults().get(0)).getPrincipal().getName();
Thanks
vhgupta wrote:
>
> I have successfully integrated rampart axis2 and being able to
> authenticate multiple clients using rampart and java key stores. Problem
> is how do I get the userId in the web-service method so that I can
> implement the business logic using the already authenticated parameter
> rather then implementing new authentication logic.
>
> Please note that I am using axis2-1.3, rampart1.3, with jdk1.6,
> tomcat6.0.13
>
> Thanks,
> Vishal
>
--
View this message in context:
http://www.nabble.com/AXIS2-RAMPART---How-to-get-userId-in-the-webService-Method-tp20733650p20733953.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]