Feb 20th, 2012, 03:43 PM
How to get MessageContext in a Spring3 / JAX-WS implementation?
I apologize if this is not the right forum in which to ask this question, but I believe that the Web Services forum is geared specifically to Spring-WS, which this is not.
I have a JAX-WS web service that is designed using the Spring 3 IOC container. There is no Spring-WS. I am trying to get access to the MessageContext object in a bean other than the endpoint bean. In order to successfully use Spring IOC, I have added SpringBeanAutowiringSupport.processInjectionBasedO nCurrentContext(this) in a @PostConstruct of my Endpoint class. So far, everything works exactly as expected.
However, I am running into one issue. I am trying to access the MessageContext object in an aspect, and I have no idea how to accomplish this. I know I can inject a WebServiceContext object into my endpoint class using a @Resource annotation, however, this does not seem to work in any other class.
Additionally, I have noticed that the CommonAnnotationBeanProcessor intentionally ignores any WebServiceContext types (as per docs) as the JAX-WS framework is supposed to handle it. I have even tried to override the constructor of the class such that it isn't ignored, but that did not make any difference either.
I am thoroughly stumped at this point. I have tried everything I can think of to get access to the MessageContext from within my Spring classes with no luck.
Any help/advice would be greatly appreciated.
Feb 21st, 2012, 12:14 AM
Originally Posted by benze
I also have the same question.
Last edited by laurabat; Mar 24th, 2012 at 12:04 AM.
May 9th, 2012, 03:48 AM
Tags for this Thread