Hi Gabo If you use exchange to get to one of the message properties inside the application code then I believe you can use JAXWS WebServiceContext and CXF JAX-RS MessageContext extension...
Cheers, Sergey -----Original Message----- From: Gabo Manuel [mailto:[email protected]] Sent: 05 June 2009 07:57 To: [email protected] Subject: Re: [CXF-2.2.2][JAXWS] Resource injection problem 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
