Web Services Development: Generating a Web Service for Spring Service Bean

This document describes the following:

1. Generating a Web Service for Spring Service Bean

Using OEPE and Oracle WebLogic Server version 10g Release 3 (10.3) or later, you can generate a WebLogic Web Service from an existing Spring service bean for your JAX-WS Web service project, as follows:
  1. Add the WebLogic Web Services facet to an Eclipse project configured with the Spring 2.5 facet (as Figure 1 shows) and containing Spring service beans.
    For more information about configuring projects for Spring, see Generating Spring Artifacts.

    Figure 1.
    Configuring Project for Spring

  2. In the Project Explorer, right-click your project, select New > Other from the drop-down menu, and then select WebLogic Web Services > Web Service for Spring Beans on the New dialog, as Figure 2 shows. This will open the Select Spring Service Bean dialog shown in Figure 3.

    Figure 2.
    Creating New WebLogic Web Service for Spring Beans

    Figure 3.
    Selecting Spring Service Bean

  3. On the Select Spring Service Bean dialog, specify the Spring bean configuration: the list will be populated with Spring service beans defined in the configuration file. Select a service bean and service methods from the service interface that you want to expose as WebLogic Web Service, and then click Next.

    Note that while one service bean can implement multiple interfaces, you can only select methods from one interface at a time. To expose methods in other interfaces, you need to generate a separate Web service. Also note that Spring ORM service beans implemented in Spring 1.n-style based on the JpaTemplate and TransactionProxyFactoryBean are not supported, therefore it is recommended that you upgrade your service bean to Spring 2.0-style using annotation-based transaction management.

  4. On the next, Web Service Class Name dialog, shown in Figure 4, you may choose to specify the Web service class name, package name and output directory, and then click Finish.

    Figure 4.
    Specifying Service Class Name

Upon completion of the preceding procedure, Eclipse creates the WebLogic Web Service class which is automatically wired up with Spring bean and delegate service calls to the Spring bean implementation.

2. Related Information