Skip to main content Skip to complementary content

Service interface

About this task

Within Eclipse:


  1. Create a Maven project, following the same steps as , and call it "locator_common" for the purposes of this example.
  2. Remove all default sources, as well as test source folder.
  3. Create a package named "demo.common", and create an interface
    package demo.common;
    import javax.jws.WebService;
    @WebService(targetNamespace = "", 
            name = "Greeter")
    public interface Greeter {
        String greetMe(String requestType);
    } will be the service interface. Now, the project structure will look like the following:


  4. The common application will be deployed as an OSGi bundle. So you will need to edit the pom.xml. (Please refer to for details.)
    <project xmlns="" 
  5. Now that you have finished the definition of the service, select Run As > Maven Install from the M2Eclipse Popup menu on the pom.xml to install the application into your Maven repository.
    The next step is to implement of this service.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!