Creating an Axis2 Project
You can create an Axis2 project for use with the Application Server.
Creating an Axis2 Service Project
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 service project:
- On the Developer Studio Dashboard, click Axis2 Service Project, leave the first option selected, and click Next.
- Fill in the information for creating the project and click Finish.
The project is created, and the service class is open in the editor. - Create a method in the service class. For example:
- Generate the WSDL as follows:
- Right-click the project and choose Generate WSDL.
- Specify the location and name for the file and click OK.
The WSDL file is generated and appears in the editor.
To create a service project from a WSDL:
- On the Developer Studio Dashboard, click Axis2 Service Project, click the option to create the project from a WSDL, and click Next.
- Browse to the WSDL file and specify a name for the project, and then click Finish.
The project is created with all the generated stubs created from the WSDL you specified.
Creating an Axis2 Client Project
You can create an Axis2 client project to generate client classes from a WSDL.
- On the Developer Studio Dashboard, click Generate Axis2 Web Service Client Project.
- Specify the WSDL, and click Next.
- Specify the src folder where you want to create the client and click Next. If you want to create a new project for this client, click Create a new Project and enter the required information.
- Configure the Axis2 options and click Finish.
For more information on Axis2 configuration, see: http://axis.apache.org/axis2/java/core/docs/adv-userguide.html
The client classes are created in the source folder you specified.
Creating an Axis2 Web Service Skeleton
You can create an Axis2 web service skeleton project to generate classes from a WSDL.
- On the Developer Studio Dashboard, click Generate Axis2 Web Service Skeleton Project.
- Specify the WSDL, and click Next.
- Specify the src folder where you want to create the skeleton and click Next. If you want to create a new project for this skeleton, click Create a new Project and enter the required information.
- Configure the Axis2 options and click Finish.
For more information on Axis2 configuration, see: http://axis.apache.org/axis2/java/core/docs/adv-userguide.html
The classes are created in the source folder you specified.
Generating an Axis2 Service Archive
You can generate an Axis2 Service Archive (AAR file) by exporting the project.
- Right-click the Axis2 service project and select Export Project as Deployable Archive.
- Select the project and location where you want to save the archive and click Finish.
Deploying 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.