Annotating an EJB bean to create a web service
You can annotate types, methods, fields, and parameters in your EJB bean to specify a web service.
Before you begin
- Your workspace contains an EJB 3.x Session bean that has at least one public method.
- This EJB bean is in a JAX-WS enabled EJB project.
- The project's Target Runtime is WebSphere® Application Server v7.0 or higher.
About this task
The steps for creating a web service from an EJB bean
using annotations is as follows:
To annotate your EJB bean:- Annotate your EJB bean with the @WebService annotation, and any other annotations required for your implementation.
- Create JMS or HTTP router modules for the web service as described in: Creating web service router modules. New in WebSphere Application Server v8, if you package your EJB application in a WAR module, you do not need to create router modules.
- Publish the application to a server as described in: Creating a web service from an annotated EJB bean by publishing to a server