Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-702

sws:annotation-driven does not pick up @Endpoint annotations on classes that are JDK proxies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.3
    • Component/s: Core
    • Labels:
      None
    • Environment:
      SWS 2.0.1.RELEASE

      Description

      We essentially have an app context loaded by the MessageDispatcherServlet that does the following:

      <bean id="ws.myWebService" class="foo.bar.MyWebServiceImpl"/>
      <aop:aspectj-autoproxy />
      <bean class="foo.bar.MyCustomAspect"/>
      <sws:annotation-driven/>

      The MyWebServiceImpl looks like this:

      @Endpoint
      public class MyWebServiceImpl implements MyWebService {
       
        @PayloadRoot(namespace = "http://my.foo.bar", localPart = "myWebService")
        @MyCustomAnnotation // picked up by MyCustomAspect to proxy this class
        @ResponsePayload
        public MyResponseDocument getFactInfo(@RequestPayload MyRequestDocument request) {
          ...
        }
      }

      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:

      <aop:config proxy-target-class="true"/>

      Note that this seems to be similar to SWS-262

        Activity

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            klr8 Erwin Vervaet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 4h 20m
              4h 20m