[SWS-702] sws:annotation-driven does not pick up @Endpoint annotations on classes that are JDK proxies Created: 04/Apr/11 Updated: 04/May/12 Resolved: 18/Oct/11
|Project:||Spring Web Services|
|Reporter:||Erwin Vervaet||Assignee:||Arjen Poutsma|
|Time Spent:||4h 20m|
|Original Estimate:||Not Specified|
We essentially have an app context loaded by the MessageDispatcherServlet that does the following:
The MyWebServiceImpl looks like this:
As a result of the @MyCustomAnnotation, the MyWebServiceImpl will be JDK proxied. Because of this the @Endpoint is not picked up. If we remove the custom aspect the @Endpoint is indeed picked up.
For now, I have added the following to the app context as a workaround:
Note that this seems to be similar to
|Comment by Arjen Poutsma [ 04/Apr/11 ]|
Changing back to unassigned, that's the way I track issues I have to take a look at.
|Comment by Arjen Poutsma [ 19/May/11 ]|
I can't seem to reproduce this. I have a test case which reproduces this scenario, but it works for me (with or without using CGlib proxies).
See https://src.springframework.org/svn/spring-ws/trunk/core/src/test/java/org/springframework/ws/server/endpoint/mapping/PayloadRootAnnotationMethodEndpointMappingTest.java and the related app context: https://src.springframework.org/svn/spring-ws/trunk/core/src/test/resources/org/springframework/ws/server/endpoint/mapping/applicationContext.xml.
Let me know what I am missing.
|Comment by Erwin Vervaet [ 25/May/11 ]|
I think you missed the "implements MyWebService" part.
|Comment by Arjen Poutsma [ 18/Oct/11 ]|
I hope I finally fixed this.
Take a look at https://src.springframework.org/svn/spring-ws/trunk/core/src/test/java/org/springframework/ws/server/endpoint/mapping/JdkProxyRegistrationTest.java and the related app context: https://src.springframework.org/svn/spring-ws/trunk/core/src/test/resources/org/springframework/ws/server/endpoint/mapping/jdk-proxy-registration.xml
Note, however, that the annotations have to be on the interface, and cannot only be on the implementing class. This is due to the fact that the AOP target might change at runtime, and it would be very inefficient to introspect the endpoint each time a web service request comes in. This is consistent with Spring MVC (see
|Comment by Arjen Poutsma [ 04/May/12 ]|
Closing old issues