Thursday, 3 May 2012

Sample Program To Start up with BPEL


Add Two Numbers


Step 1 :


Open Jdeveloper , Click on Application Tab, and select new
Enter Application name and select SOA Application,



Click Next, Enter Project Name, select SOA and click next



Select Empty Composite and click on Finish


Step 2:   Drag and drop BPEL Component to Component Section, as below image



BPEL dialog box will Open, Enter all the fields as below, tick on Expose as SOA Service,
select Synchronous Process



XSD,WSDL,Bpel Files will be created automatically.


Click on XSD and Edit it as below, SAVE ALL




Click on DemoAddNumbers.bpel, drag and drop Assign activity below receive activity



Double click on Assign activity,  click on '+' symbol and select copy operation.
From and To will be available
In From, select Type as Expression, Click on Xpath Expression Builder,
Select input variable numberA + numberB (code shown below)
bpws:getVariableData('inputVariable','payload','/client:process/client:numberA') + bpws:getVariableData('inputVariable','payload','/client:process/client:numberB')
Click Ok



In To, select Outputvariable--> Result and click OK.. As shown below



Click OK, Apply.. In BPEL designer window click on validate symbol



Now deploy the Application as shown in the figure






After deployement, Open enterprise manager http://localhost:7001/em
Select DemoAddNumbers and double click on it



Click on Test as shown below


Select view as XMLview, and give input's to numberA and numberB as below


Click on Test Web Service, the Result is shown below



No comments:

Post a Comment