Index Changes

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 Http SOAP BC 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.

Software/Tools needed

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 a POJO Service

Right click on the project node, select new File/Other wizard, select ESB from Categories and select POJO from the File Types.


POJO Service wizard appears as below. Enter class name, package name and method name as appropriate. Select String as input and out parameter type. POJO Engine will automatically serialize incoming NormalizedMessage Trax Source(javax.xml.transform.Source) object to String type. POJO Engine will serialize after unwrapping if any JBI WSDL 1.1 wrapper elements.


Click on the advance button to see some of the default values.


Press Finish. You will notice a class is created with @POJO class level and @Operation annotation at the method level.


Note the both annotations does not require any of the properties as a mandatory. Wizard has added output message type QName as it is required by when consumed by BPEL SE and Http SOAP BC.

Note Wizard also adds to the project, library jars needed to compile classes.


Create a Composite application project

Right click on the project explorer, select new Project, select "SOA" category and Composite Application project type.



Add Java SE project just created to this Composite Application project.


Invoke "clean and build" ant target on the composite application project. Note the Java SE project node appears under the Composite Application project's JBI Module node.


Since we want to invoke POJO service using HTTP SOAP BC, will be connect SOAP port endpoint to POJO service endpoint.


We just completed the creation of POJO service and a composite application where HTTP SOAP BC is invoking POJO service.

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. Select Composite Application project's "test" node. Right click and select create test action.





Update input message with string you want to test.


When test run action on the newly created test node is executed, Composite Application project tester builds and deploys the application, then runs the test.


Test output message content should match with the input text used to test.

Return to the top
Return to POJO SE tutorials Page
Return to POJO SE Page

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-12) was last changed on 12-Nov-09 14:21 PM, -0800 by GirishPatil