Hi Dan, Sergey,
On Thu June 4 2009 4:46:25 am Ga
@Resource
private Exchange exchange;
The main reason is that JAX-RS, by default, creates a new instance per request
and thus is injected per request.
Not sure what exactly I changed and I cannot trace it anymore, the
Exchange is now null even for JAX-RS transactions. It's ok though, I
have a work-around to get what I need. :)
Hmmm... that should have worked I would think. Maybe the wss4j removes the
header if it's processed? Not really sure.
That said, if you run after the Wss4jInInterceptor, you can do one of:
Principal p = (Prinicpal)message.get(Wss4jInInterceptor.PRINCIPAL_RESULT)
or
SecurityContext c = message.get(SecurityContext.class);
Principal p = c.getUserPrincipal();
Both of them worked! I'll just use the first. Thanks for that.
Gabo