Rules for methods in classes annotated with @WebService

When you use the @WebService annotation, several rules control how methods are exposed in your web service and how you can use the @WebMethod annotation.

The following rules apply in this situation:
  • If the @WebService annotation of an implementation class refers to a Service Endpoint Interface (SEI), the implementation class must have no @WebMethod annotations.
  • In an SEI or in an implementation class that does not refer to an SEI, all public methods are treated as exposed, even if the @WebMethod annotation is not specified. The exposed public methods include any inherited methods, except for methods in the Object class.
  • In an SEI or in an implementation class that does not refer to an SEI, if a @WebMethod annotation has an attribute of exclude=true, the method is not exposed.
Icon that indicates the type of topic Reference topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: rwsandoc006.html