Accessing jax-rs (cxf) MessageContext outside service
Hey All,
I'm trying to access the MessageContext (or WebServiceContext) in an aspect to get access to the HTTPServletRequest for logging purposes. I would like to inject the context like I did for spring-ws but I have not found a way to do it. Here is what I used for spring-ws:
Code:
<beans:bean id="transportContext" class="org.springframework.ws.transport.context.TransportContextHolder" factory-method="getTransportContext" scope="request">
<aop:scoped-proxy/>
</beans:bean>
I can't use the @Resource annotation as I am not in the service (tried anyways with no luck). Any ideas?
thanks