As we can see, creating a web service from an existing session bean results on a new
stateless session bean being created. This new session bean acts as a client for our
existing EJB (as evident by the ejbRef instance variable in our example, which is
annotated with the @EJB annotation).
Clicking on the Design button at the top, we can see the visual designer for our
newly created web service.
EJBs can also be exposed as web services from a web application project, in which
case the generated web service will be a POJO annotated with the @WebService ,
@WebMethod and @WebParam annotations, with pass-through methods invoking
the corresponding methods on the EJB being exposed as a web service.