Index Changes

Difference between version and version     

Back to Rest BC Echo, or Rest BC Echo Info


At line 4 changed 1 line.
!!! Summary
!! Summary
This sample illustrates how to leverage RestBC in OpenESB to implement a simple Echo service. The Echo service simply returns the same input data by user using HTTP POST to the service.
At line 8 added 1 line.
!! How to Build the Sample Project
At line 8 changed 1 line.
!!! How to Build the Sample Project
* First we need to create a BPEL project using NetBeans IDE
At line 12 added 1 line.
[001.png]
At line 14 added 1 line.
* Next, create a new WSDL document inside the BPEL project, choose Rest Inbound as the Binding to use in the wizard
At line 12 changed 1 line.
!!! Running the Sample
[002.png]
At line 18 added 2 lines.
* Next, add a "POST" operation, and give the operation a name, such as "echo". Then click the "Edit Operation" button to edit more details about this operation
[003.png]
At line 21 added 3 lines.
* In the required "Path" textfield, put "/echo" as the URL path for the Echo service we wish to provision. For now, just leave everything else as default
* "Default HTTP Listener" by RestBC uses default port 9696
[004.png]
At line 25 added 4 lines.
* After save changes to the WSDL document. Drag-n-drop the WSDL document into the BPEL editor on the left swim-lane.
* Add BPEL operators by drag-n-drop widgets from the right toolbox. We need "Receive", "Assign", and "Reply" operators in that order.
* Choose Partner-Links for the "Receive" and "Reply" operators. Then need to double-click the "Assign" operator to goto the BPEL mapper
[005.png]
At line 30 added 27 lines.
* In the mapper, simply map "EchoIn->part1" to "EchoOut->part1". This implements the simple Echo logic.
[006.png]
* Save your changes
* Create a new Composite Application Project, and add the above created BPEL project to the Composite Application.
* Clean and build the Composition Application Project, then you should see something similar to the diagram show in the CASA Editor
[007.png]
* Deploy the CompApp Project to GlassfishESB server.
* Your Echo project is now running and ready to be tested.
* The service URL is here: "http://localhost:9696/echo
!! Running the Sample
* Use CURL tool to invoke the Echo service currently running
* First, let's try post a XML input data to the service, and see what happens
[008.png]
* Next, switch the HTTP Headers to indicate that we are posting and accepting JSON data instead of XML data, and see what happens
[009.png]
!! Sample Project Zip
* Attached is the reference project for the above steps
[echo.zip]

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-4) was last changed on 18-Dec-09 14:37 PM, -0800 by Edward Chou