Creating a Web service from an annotated Java bean by publishing to a server

After annotating a Java™ bean, you can generate a Web service application by publishing the application project of the bean directly to a server. When your Web service is generated, no WSDL file is created in your project.

Prerequisites:

To create a Web service from an annotated Java bean:

  1. Open the Servers view, if it is not already open, by clicking

    Window | Show View | Servers in the menu bar.

  2. If the application project that contains your Java bean has not been published to a server:

    1. In the Servers view, right-click the server where you want to publish your application.

    2. In the menu, click

      Add and Remove Projects.

    3. In the Add and Remove Projects window, from the

      Available projects list, select the application project that contains your Java bean.

    4. Click

      Add; then click Finish.

  3. If you haven't specified a preference for automatically publishing to local servers, right-click the server where you want to publish your application and click

    Publish.

Your Java bean is published as a Web service on the server. JAXB classes are generated and packaged into the application at the point of publication.

 

Related tasks

Creating a Web service from an annotated Java bean by using a wizard

Creating a Web service from a Java bean and a WSDL file

Creating a WebSphere server and JAX-WS Web project