Return to POJO SE Page
Return to POJO SE tutorials Page
Echo Service
In this tutorial we will develop simple Echo service using Netbean tooling support for the POJO Service Engine.
We will create a Composite Application so that BPEL will be used to invoke POJO service. We will also use Composite Application project's tester to test our Service.
Since originally written, some of the API classes have changed, but in most part this sample/tutorial should work. You can find more details of API changes
here and
here.
Create a Java Project
POJO Service Engine support is added to Netbeans Java SE project.
After installing Netbeans and Glassfish using the Open ESB installer, create a Java SE project.
Create POJO for Binding.
Right click on the project node, select new File/Other wizard, select ESB from Categories and select POJO for Binding from the File Types.
Choose File BC - Poll & Write back reply
Click next configure input file ( say c:\temp\input.xml) and output file ( say c:\temp\output.xml)
Click next and configure POJO class.
Click Finish.
Create a Composite application project
Add Java SE project just created to this Composite Application project.
Invoke "clean and build" ant target on the composite application project.
We just completed the creation of POJO service for File Binding Component and a composite application.
Start the server
Before we deploy the Composite Appication, make sure POJO Service Engine is installed and started.
Navigate to server tab, select server node, select "Start"
If POJO Service Engine is not installed, download and install the engine.
Test the application
Now we are ready to create a test and test the application. Create an input.xml in c:\temp containing any data. As soon as the
file is created File BC polls the input file and invokes the POJO service. After a while you will see output.xml generated in c:\temp
continaing same data as input.
Return to the top
Return to POJO SE Page
Return to POJO SE tutorials Page