Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

You can create JAX-WS (SOAP) and JAX-RS (REST) service projects for use with the Application Server. You can create a new, empty project and develop the service as a Java class inside the project, or create the project and service in one step using an existing WSDL file. 

To create an empty project:

  1. On the Developer Studio Dashboard, click JAX-WS or JAX-RS, leave the first option selected, and click Next.
    The Create New JAX-WS Service dialog appears.
  2. Do the following:
    1. Type a unique name for the project.
    2. Specify the package and class name.
    3. Optionally specify the location where you want to save the project (or leave the default location specified).
    4. Optionally specify the working set, if any, that you want to include in this project.
  3. A Maven POM file will be generated automatically for this project. If you want to include parent POM information in the file from another project in this workspace, click Next, click the Specify Parent from Workspace check box, and then select the parent project.
  4. Click Finish.

The project is created. You now create the web service as a Java class inside this project.

To create the Java service class:

  1. Right-click the project you just created, and then choose New -> JAX-WS Service Class or New -> JAX-RS Service Class.
    The New JAX-WS Class dialog appears.
  2. Specify the information for the bean class and optionally the interface class, and then click Finish.

The classes are created inside the project.

To create a project and service from a WSDL:

  1. On the Developer Studio Dashboard, click JAX-WS or JAX-RS, click the option to create the project from a WSDL, and click Next.
  2. Enter a name for the project, browse to the WSDL file, and specify the CXF home and a custom package name.
    You can download the CXF Binary Distribution and extract it. The location where you extract it is your CXF Home. 

The service class has been generated and contains the public endpoint interface described by the WSDL without the implementation. You now develop the service implementation class inside the project.

You can export the project as a web application (WAR) file or you can add it as dependency of a Carbon Application project that you deploy on the WSO2 Application Server. To create a deployable archive (WAR), right-click the project, select Export Project as Deployable Archive, and choose the destination location.

  • No labels