Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3873

Web Services can't inherit a JDK8 default method

    Details

    • Steps to Reproduce:
      Hide

      1. get attached test project
      2. mvn test -Djboss.home=/path/to/server

      for testing with WildFly add -Dwildfly to above command

      Show
      1. get attached test project 2. mvn test -Djboss.home=/path/to/server for testing with WildFly add -Dwildfly to above command

      Description

      Having simple SEI and POJO webservice with JDK8 feature - default method for interface:

      @WebService
      public interface GreeterSEI {
         default public String sayHello() {
            return "Hello, Default";
         }
      }
       
      //----------------------------------------------------------
       
      @WebService
      public class GreeterImpl implements GreeterSEI {}
      

      When you try to execute sayHello method:

      Service greeterService = Service.create(...);
      GreeterSEI g = greeterService.getPort(GreeterSEI.class);
       
      Assert.assertEquals("JBoss", greeter.sayHello());
      

      You will get a message-less IllegalStateException on server.

      Expected results:
      no exception, default implementation of method is invoked.
      Or if this is considered unsupported usage, the exception should be more descriptive (ie.: "Method xx not found on implementation class")

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jim.ma Jim Ma
                  Reporter:
                  jbliznak Jan Blizňák
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: