WSO2 IDE Tools
Documentation
- User Guide
- Configure Eclipse for JDK 1.6
Get Involved
Project Information
User Guide
This user guide provides information on,
- Installing the Eclipse Editor Feature
- Creating new WSO2 Carbon applications, sequences, endpoints and proxy services
- Importing sequences, endpoints and proxy services from an existing xml file located in the file system
- Invoking created sequences, endpoints and proxy services in to a running WSO2 ESB
Content
Introduction
WSO2 ESB Eclipse Editor Plugins will provide you the ability to create, import Sequences, Proxy Services and Endpoints inside eclipse. With the WSO2 ESB Server plugin, you can deploy the added editors in the WSO2 ESB.Prerequisites
You need to have basic prerequisites that are associated with installing WSO2 ESB Eclipse Editor Plugins in Eclipse. Please refer to Prerequisites section of the Installation Guide for more information. Apart from them, you need to have latest WSO2 ESB distribution.Installation
Please refer the Installation Guide for details on how to install WSO2 ESB Eclipse Editor Feature.Create New Editor
1. Creating a WSO2 Carbon Application
First you have to create a WSO2 Carbon application. To create a WSO2 Carbon project go to File -> New -> Other -> WSO2 Carbon -> Carbon Application and click Next.Give a name to WSO2 Carbon project and click Finish.
Now you will have a WSO2 Carbon project with the following folder structure.
2. Creating a Sequence
Right click on the project explorer window and New -> Other -> WSO2 Carbon -> Sequence Editor and click Next.
Give a name to the sequence and select the WSO2 Carbon project that you want to save the sequence in to and click Finish.
Selected project should be a WSO2 Carbon project, if not plugin will pop up an error message saying selected project is not a WSO2 Carbon project. There is a check box saying "Start Sequence Editor" which is ticked by default. Plugin will start the web editor inside Eclipse only if that check box is clicked. Now the sequence editor will open in the internal browser of Eclipse and it will provide basic functionality that can be found in WSO2 ESB Sequence Editor.
3. Creating an EndPoint
Right click on the project explorer window and New -> Other -> WSO2 Carbon -> EndPoint Editor and click Next.
Give a name to the EndPoint and select the WSO2 Carbon project that you want to save the endpoint to. You can create four kinds of endpoints with WSO2 ESB Eclipse Editor Feature. They are considered as EndPoint templates.
- Address EndPoints
- WSDL EndPoints
- FailOver Groups
- Load Balance EndPoints
Created EndPoint will be displayed as follows in Eclipse internal browser.
According to the selected template, default data will be filled in to required fields of the endpoint. You can edit those information if needed.
4. Creating a Proxy Service
Right click on the project explorer window and New -> Other -> WSO2 Carbon -> Proxy Services Editor and click Next.
Give a name to the Proxy Service and select the WSO2 Carbon project that you want to save the proxy service in to. You can create two types of proxy services with WSO2 ESB Eclipse Editor Feature. They are considered as Proxy Services templates.
- Proxy Service with Address EndPoint Template
- Proxy Service with In Sequence Template
Created proxy service will be displayed as follows in Eclipse internal browser.
According to the selected template, default data will be filled in to required fields of the proxy service. You can edit those information if needed.
Sequences, EndPoints and Proxy Services will be saved in the relevant directory of WSO2 Carbon application. i.e squences that you have created will be saved in the
Sequences directory, Endpoints will be saved in the EndPoints directory and proxy services will be saved in the
Proxy Services directory of the WSO2 Carbon Project.
Import Editors
You can import sequences, proxy services and endpoints from a synapse.xml or any other external xml file which has sequences, proxy services, endpoints configuration through the Import option of Eclipse.
External xml file should have the expected format by synapse as below.
<?xml version="1.0" encoding="UTF-8"?> <syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse"> <syn:registry provider="org.wso2.carbon.mediation.registry.WSO2Registry"> <syn:parameter name="cachableDuration">15000</syn:parameter> </syn:registry> <syn:sequence name="main"> <syn:log/> <syn:drop/> </syn:sequence> <syn:sequence name="fault"> <syn:log/> </syn:sequence> </syn:definitions>
1. Import Sequence
Right click on the project explorer window and Import -> Other -> Sequences and click Next.
Select an appropriate WSO2 Carbon project and the path of the xml file that you have sequences. Then it will list available sequences and you can select sequences that you want to save in the workspace. With the Select All option, you can choose all the sequences in the file at once. Then click Finish.
The selected sequences will be created inside the relevant WSO2 Carbon project. If you want to open the created sequence in the Eclipse internal web browser, double click on the file and it will open in the correct editor.
2. Import EndPoints
Right click on the project explorer window and Import -> Other -> EndPoints and click Next.
Select an appropriate WSO2 Carbon project and the path of the xml file that you have endpoints. Then it will list available endpoints, so that you can select endpoint which you want to save in the workspace. With the Select All option, you can choose all the endpoints in the file at once. Once the endpoints are selected, click Finish.
The endpoints which you selected will be saved inside the relevant WSO2 Carbon project. If you want to open the created endpoint in the Eclipse internal browser, double click on the file and it will open in the correct editor.
3. Import Proxy Services
Right click on the project explorer window and Import -> Other -> Proxy Services and click Next.
Select an appropriate WSO2 Carbon project and the path of the xml file that you have proxy services. Then it will list available proxy services, so that you can select proxy service which you want to save in the workspace. With the Select All option, you can choose all the proxy services in the file at once. Then click Finish.
The proxy services which you selected will be saved inside the relevant WSO2 Carbon project. If you want to open the editor in the Eclipse internal browser, double click on the file and it will open in the correct editor.
Invoke Editors
All the editors that you created are saved in a WSO2 Carbon Project. You can deploy them in WSO2 ESB with the ESB Server plugin.
Open Servers window. If you cannot find it go to Window -> Show View -> Servers. If you are still unable to find it go to Window -> Show View -> Other and select Servers from there.
Right click on the Servers window New -> Server -> WSO2 -> WSO2 ESB 2.1 and click Next.
Specify the path of the WSO2 ESB that you have already downloaded as ESB Home.
Select the needed JRE, if it is not the required JRE. Then click Next.
You can download latest WSO2 ESB from here.
Give the ports you want to run WSO2 ESB on, or you can leave them as they are for default values to be selected. Then click Next.
There is a check box which is enabled by default, to Bring up the esb home in the browser when this server starts. This allows to start WSO2 ESB in web browser after server startup.
Select the WSO2 Carbon project that you want to invoke click Add and then click Finish.
Go to Servers window and start the server.
You will see the messages as below when the server started.
Created sequences, proxy services and endpoints will be added to WSO2 ESB server and you can view them from the web browser.
Created sequence will be displayed as follows.
Created endpoint will be displayed as follows.
Created proxy service will be displayed as follows.
You can remove the project which you added previously from the server as well. For that expand WSO2 ESB 2.1 at localhost and right click on the added project and select Remove. You can remove multiple projects at once by right click on the WSO2 ESB 2.1 at localhost and select Add and Remove option.
If a project contains endpoints or sequences or proxy services which are available in another project of the workspace, when you try to publish that project, it will not be successful since you cannot have two endpoints or sequences or proxy services with similar name in a synapse configuration file. If a project contains atleast one confilicting item, entire project will not be published. Project that are published will be displayed as Synchronized at the Servers window under WSO2 ESB 2.1 at localhost.
When the project is not publish, you will get an error message as below.