• 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
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

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 !!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic