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:
- On the Developer Studio Dashboard, click JAX-WS or JAX-RS, leave the first option selected, and click Next.
- Fill in the information for creating the project and 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:
- Right-click the project you just created, and then choose New -> JAX-WS Service Class or New -> JAX-RS Service Class.
- In the service creation class dialog box, 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:
- On the Developer Studio Dashboard, click JAX-WS or JAX-RS, click the option to create the project from a WSDL, and click Next.
- 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.