Axis2
  1. Axis2
  2. AXIS2-4890

Support for service classes having a Java 5 parameterized type (class/multiple interfaces) as a super type.

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: nightly
    • Component/s: adb, kernel
    • Labels:
      None

      Description

      When a class implements an interface (or extends a class) which is a parameterized type, compiler creates a synthetic method which behaves as a bridge method in order to support sub classing. Axis2 detects this bridge method as an overloaded method and hence does not properly support service classes having parameterized super types. For example, axis2 does not support EchoClass below as a service class.

      public interface Echo<T>

      { public T echo(T value); }

      public class EchoClass implements Echo<String> {
      public String echo(String value)

      { return value; }

      }

      1. patch2.txt
        4 kB
        Sadeep Jayasumana
      2. patch.txt
        2 kB
        Sadeep Jayasumana

        Activity

        Sadeep Jayasumana created issue -
        Hide
        Sadeep Jayasumana added a comment -

        Patch attached. Here we skip bridge methods when generating schemas so that they won't be detected as overloaded methods. RPCMessageReceiver is modified to direct the web service call to the actual method by neglecting bridge methods when searching for a candidate method.

        Show
        Sadeep Jayasumana added a comment - Patch attached. Here we skip bridge methods when generating schemas so that they won't be detected as overloaded methods. RPCMessageReceiver is modified to direct the web service call to the actual method by neglecting bridge methods when searching for a candidate method.
        Sadeep Jayasumana made changes -
        Field Original Value New Value
        Attachment patch.txt [ 12460032 ]
        Hide
        Sadeep Jayasumana added a comment -

        New patch is attached with some improvements.

        Show
        Sadeep Jayasumana added a comment - New patch is attached with some improvements.
        Sadeep Jayasumana made changes -
        Attachment patch2.txt [ 12466219 ]
        Senaka Fernando made changes -
        Assignee Senaka Fernando [ senakafdo ]
        Hide
        Senaka Fernando added a comment -

        Applied patch. Thanks Sadeep.

        Thanks,
        Senaka.

        Show
        Senaka Fernando added a comment - Applied patch. Thanks Sadeep. Thanks, Senaka.
        Senaka Fernando made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s nightly [ 12312081 ]
        Resolution Fixed [ 1 ]
        Sadeep Jayasumana made changes -
        Issue Type Improvement [ 4 ] New Feature [ 2 ]
        Description When a class implements an interface (or extends a class) which is a parameterized type, compiler creates a synthetic method which behaves as a bridge method in order to support sub classing. Axis2 detects this bridge method as an overloaded method and hence does not properly support service classes having parameterized super types. When a class implements an interface (or extends a class) which is a parameterized type, compiler creates a synthetic method which behaves as a bridge method in order to support sub classing. Axis2 detects this bridge method as an overloaded method and hence does not properly support service classes having parameterized super types. For example, axis2 does not support EchoClass below as a service class.

        public interface Echo<T> {
            public T echo(T value);
        }

        public class EchoClass implements Echo<String> {
            public String echo(String value) {
                return value;
            }
        }
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        27d 12h 34m 1 Senaka Fernando 17/Dec/10 06:46

          People

          • Assignee:
            Senaka Fernando
            Reporter:
            Sadeep Jayasumana
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development