JSR-181 metadata describes declaratively how the logic of a service implementation bean
is exposed over networking protocols as a Web Service. The @WebService tag marks a
Java class as implementing a Web Service. @WebMethod tags identify the individual
methods of the Java class that are exposed externally as Web Service operations, as
illustrated in the following example. The example uses JSR-175 syntax and the
annotation type declarations defined in the javax.jws and javax.jws.soap packages.
import javax.jws.WebService; import javax.jws.WebMethod; @WebService public class HelloWorldService { @WebMethod public String helloWorld() { return "Hello World!"; } }