• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

inheriting a @WebMethod from a parent class.

 
Bartender
Posts: 2419
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to MZ's notes:


The BeanImp inherits the superMethod1 and this superMethod1 will be exposed as a web method.

But what if BeanImp wants to override superMethod1, but does not want to expose it as a web method ?
 
Greenhorn
Posts: 20
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I'm getting you question correctly, just add @WebMethod annotation w/ exclude=true to the sub class method you want to hide. See below
 
Himai Minh
Bartender
Posts: 2419
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. That is one of the solution.
But I want BeanImp class to inherit the superMethod1() in Base class. I don't want to override superMethod1() in BeanImpl.
 
Ranch Hand
Posts: 38
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand, you don't want to expose superMethod1() as a web method in your BeanImp, and you don't want to change the implementation in the BeanImp?!

As far as I know, you can do what Noni Singh said and call the super method from inherited one! I believe in that way the method in BeanImp will not be exposed as a web method,
and you will get the complete implementation of the superMethod1() from the Base class.



Sorry if I misinterpreted the question.
 
Himai Minh
Bartender
Posts: 2419
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I got it. Use super.superMethod1() to inherit the parent's method.
 
reply
    Bookmark Topic Watch Topic
  • New Topic