• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Exposing ws methods

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit confused about how to expose a method as a web-service method using @WebMethod annotation.

Consider the next web-service ejb





According to JSR-181:

If the implementation bean does not implement a service endpoint interface and
there are no @WebMethod annotations in the implementation bean (excluding
@WebMethod annotations used to exclude inherited @WebMethods), all public
methods other than those inherited from java.lang.Object will be exposed as Web
Service operations
, subject to the inheritance rules specified in Common
Annotations for the Java Platform [12], section 2.1.



So, if i want to expose ONLY method1 i could do:




According to an enthuware question, the same could be accomplish by doing this :




I think the key is in

and there are no @WebMethod annotations in the implementation bean



So, a correct interpretation would be :

If I explicitly expose one method, the all other method i want to be exposed must be exposed explicitily.
Otherwise all methods would be exposed except the ones marked with @WebMethod(exclude="false")

Is this ok ?

Thanks.
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pedro,

Yes, you're perfectly right!

Beno�t
 
Pedro Erencia
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks -again - Beno�t !!
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic