This page walks you through the fundamentals of using Developer Studio to develop WSO2 projects in Eclipse. It assumes you have a basic understanding of Eclipse, including concepts such as projects and workspaces. It includes the following sections:
Creating new projects
Let's assume AcmeSuper is a shopping complex with branches in the cities of Colombo, Galle, and Kandy, and you want to create a different SOA application for each of the different locations. You have folders on your local file system, one for each location, that are synched with branches in your source control system (such as SVN), so you want to create the SOA application projects in those folders.
First, to follow along with this example, create a folder called AcmeSuper anywhere on your file system with three subfolders: Colombo, Galle, and Kandy. These folders represent the location where your source code is checked out.
Next, create an Apache Axis2 Service in the Colombo branch by following these steps:
- In Eclipse, choose Developer Studio -> Open Dashboard to display the dashboard (if it's not already visible), and then click the Axis2 Service Project link.
- In the Axis2 Service wizard, specify whether you want to create the service manually (the first option) or from a WSDL. For this example, leave the first option selected.
- Click Next, and then specify the following:
- Unique names for the project, package, and class you are creating for this service.
- Clear the check box and specify the path to the Colombo folder followed by the project name. This will ensure that you're creating the project in the same directory as your existing source code and will make it easier to check the files into your source control system.
- If you want to add this project to any working sets, select the check box and specify the working sets. For this example, we won't specify any working sets.
The new project has been created in the workspace.
All the relevant files were created in the Colombo folder in your local file system, making it easy to check in your changes to your source control system.
You can create a container project at the root level, and all the projects underneath it will be displayed under that project. For example, you might create a general project called AcmeSuper at the root level:
When the project is created, it includes the AcmeConsumerServiceColombo service we already created.
You can now create additional applications in the folder structure by right-clicking a folder and choosing New followed by the type of application you want to create. For example, to create a data service inside the Kandy branch, right-click the Kandy folder in the project explorer and choose New -> Data Service Project.
After you create your applications, you can group them by creating Composite Application Projects (choose File -> New -> Other and select Composite Application Project). Depending on your requirements, you could create separate Composite Application Projects for each and every branch (such as one for Colombo, one for Galle, and one for Kandy), or you could create a single Composite Application Project for your root project (such as AcmeSuper). You can then generate Composite Application Archives (CAR), which can be deployed to Carbon Servers.
Importing existing projects
If you want to create a project within a hierarchy of existing projects created by another developer, you must import those projects. For example, assume one of your developers created a project called Parent with several sub projects under it and checked it into your source control system. If you want to add projects under the Parent project, first make sure you have the latest version of this source code, and then do the following:
- Right-click in the Project Explorer in Eclipse and click Import -> Import.
- In the Import dialog box, expand the WSO2 category, click Existing WSO2 Projects in to workspace, and click Next.
- In the Import Projects dialog box, click Browse, select the directory where the Parent project resides on your local file system, and click OK.
- The Import Projects dialog box now displays all the WSO2 projects in the Parent project you selected. Select the projects you want to import into your workspace and click Finish.
The projects are now imported into your workspace, and you can create projects within this hierarchy as described in the previous section.
Where to go next
To learn more about using Developer Studio, see the User Guide for details on developing, packaging, and deploying various types of artifacts, and see the Retail Banking Sample for a tutorial on developing a complete application.