concept @webservice annotation in category ejb

appears as: @WebService notation, The @WebService notation
EJB 3 in Action, Second Edition

This is an excerpt from Manning's book EJB 3 in Action, Second Edition.

We’re going to analyze a lot of code in this book—some just as easy as this. You could trigger the hello as a web service by simply adding the @WebService annotation. You could inject a resource, like a helper bean that will translate hello into foreign languages, with @Inject. What do you want to do with EJB? If you keep reading, we’ll probably tell you how to do it.

In this listing, the @WebService annotation defines the interface as exposing a web service. It also specifies the SOAP binding style: RPC encoded . The implementation of the class also has the @WebService annotation with the endpointInterface referencing the web service interface ; the bean also implements that interface. The class then implements the method being exposed . Note that the getBids method isn’t exposed because it doesn’t appear in the interface.