As we can see, creating a web service from an existing session bean results in a new
stateless session bean being created. This new session bean acts as a client for our
existing EJB (as evidenced by the ejbRef instance variable in our example, which is
annotated with the @EJB annotation).
By 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.