Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-52679

As a developer I want to register a SOAP Web Service using osgi

    Details

      Description

      Now it is possible to publish JAX-WS web services by providing OSGi services annotated with javax.jws annotations:

      ServiceAsComponent.java
      
      @org.osgi.service.component.annotations.Component(
          immediate=true,
          property = {
              "jaxws=true",
              "soap.address=/greeter"
          },
          service=GreetingService.class
      )
      @javax.jws.WebService
      public class GreetingService {
          public String greet(String name) {
              return "Greetings " + name + "!";
          }
      }
      

      the code above will make the portal publish that service under "/o/soap/greeter", publishing the service WSDL under "/o/soap/greeter?wsdl"

      It is also possible to register a JAX-WS service using JAX-WS Endpoint API:

      JAXWSEndpointAPI.java
      javax.xml.ws.Enpoint.publish("/address", new ServiceImplementor());
      

      It is also possible to register handlers for the services using JAX-WS api in the latter case, or registering them as OSGi services using a pattern similar to Http Service Whiteboard. Please see the component tests for usage examples.

        Attachments

          Activity

            People

            Assignee:
            lawrence.lee Lawrence Lee
            Reporter:
            carlos.sierra Carlos Sierra (Inactive)
            Recent user:
            Kiyoshi Lee
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                7.0.0 M7