I am trying to access the MessageContext (or WebServiceContext) in an aspect to access the HTTPServletRequest for logging. I would like to add context, as I did for spring-ws, but I did not find a way to do this. Here is what I used for spring-ws:
<beans:bean id="transportContext" class="org.springframework.ws.transport.context.TransportContextHolder" factory-method="getTransportContext" scope="request"> <aop:scoped-proxy/> </beans:bean>
I cannot use the @Resource annotation in the WebServiceContext field / method since I am not in the service (in any case, no luck). Creating an instance of WebServiceContext (i.e., New WebServiceContextImpl ()) does not work either, but presumably should be, since it just wraps threadlocal. I also tried importing cxf-extension-jaxws.xml and connecting bean with id org.apache.cxf.jaxws.context.WebServiceContextImpl with no luck (it is not empty, but does not contain anything) Any ideas?
thanks
source share