You have developed an application consisting of Java EE Stateless session beans. Methods of these beans use simple Java types. You would like to convert them to web services. How can you achieve it?
-
Update web.xml
-
Use Resource Injection
-
Use annotations
-
Update ejb-jar.xml
C
Correct answer
Explanation
EJB 3.0 simplifies converting stateless session beans to web services through annotations. By adding @WebService to the bean class and @WebMethod to business methods, the container automatically generates the WSDL and SOAP endpoints. This is much simpler than updating deployment descriptors (web.xml, ejb-jar.xml) or using resource injection (which is for dependencies, not web service configuration).