• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exposing ws methods

 
Pedro Erencia
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • 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.
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks -again - Beno�t !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic