Labmanual SOA IT2406

download Labmanual SOA IT2406

If you can't read please download the document

description

soa lab manual 7th sem it

Transcript of Labmanual SOA IT2406

WWW.VIDYARTHIPLUS.COM

OMSAKTHI

ADHIPARASAKTHI ENGINEERING COLLEGE

MELMARUVATHUR

DEPARTMENT OF INFORMATION TECHNOLOGY

IT2406-SERVICE ORIENTED ARCHITECTURE LABORATORY

IV YEAR/VII SEMESTER

Presented By

Ms.R.MANIMOZHI Lect.

Mr.P.ELUMALAIVASAN, Asst.Prof

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

LIST OF EXPERIMENTS

SNO

EXPERIMENT NAME

PAGE NO

1

Creation of web service for addition operation

3

2

Creation of web service client for finding factorial number

5

3

Login web service

8

4

Implementation of calculator and simple and compound interest

13

calculation using .Net

5

To develop student detail using .Net

20

6

Invoke EJB components as web services

27

7

EJB components for finding power value

30

8

Invoking J2EE web service in ASP.Net using C#

36

9

Create addition web service in ASP.Net invoke it in using C#

41

10

Invoking ASP.Net web service using J2EE

45

11

Implementation of Orchestration with BPEL to Add Two Numbers

49

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Ex.No:1 CREATION OF WEB SERVICE FOR ADDITION OPERATION

AIM:

To write a program for creation of web service for addition operation.

PROCEDURE:

Using the Netbeans API create a project of the type web application.

Create a web service in the project.

3: Click on the design tab and modify the application logic web services.

4: Save the project.

5: Right click on the project and click on deploy and undeploy.

6: Then test the web service.

PROGRAM

package pac;

import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.WebParam; import javax.jws.WebService; @WebService()

public class addservicce { @WebMethod(operationName = "add") public int add(@WebParam(name = "a") int a, @WebParam(name = "b")

int b) {

int c=a+b; return c; }

}

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

OUTPUT:

RESULT:

Thus the creation of web service for addition operation was verified and executed

successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Ex.No:2 CREATION OF WEB SERVICE CLIENT FOR FINDING

FACTORIAL NUMBER

AIM:

To create a web service client for finding factorial of given number using Net Beans6.5

PROCEDURE:

In the Net Beans6.5 create a project for factorial in server side using file->new project.

After creating the project right click the project and select new->web service

Then right click the web service name and select add operation.

Include all variable and the data type then click ok.

Then write the code for factorial.

After again create a project for factorial in client side using file->new project.

After creating the project right click the project and select new->web service client.

Then browse and choose the factorial server project then click ok.

Again right click the client project and choose new->jsp file then give the name for jsp file.

In the JSP file right click and choose web service client resource->call web service operation.

Then select server project click ok.

In the index file create a form and include jsp file as action.

Finally deploy the client project and run the file to get the output.

PROGRAM: Fact.java package fact;

import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; @WebService()

public class fact { @WebMethod(operationName = "f1") public int f1(@WebParam(name = "a") int a) {

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

int fact=1;

for(int i=1;i 0 Then inc = inc - 1 navigate()

Else

MsgBox("First Record") End If

End Sub

Private Sub nextbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nextbutton.Click

If inc MaxRows - 1 Then inc = inc + 1

navigate() Else

MsgBox("No More Rows") End If

End Sub

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Private Sub last_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles last.Click

If inc MaxRows - 1 Then inc = MaxRows - 1 navigate()

End If End Sub

Private Sub addbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addbut.Click

savebut.Enabled = True addbut.Enabled = False updatebut.Enabled = False delbut.Enabled = False cancelbut.Enabled = True nametxt.Text = "" regtxt.Text = "" depttxt.Text = "" emailtxt.Text = "" agetxt.Text = "" phnetxt.Text = "" semtxt.Text = ""

End Sub

Private Sub delbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles delbut.Click

Dim cb As New OleDb.OleDbCommandBuilder(da) ds.Tables("AddressBook").Rows(inc).Delete()

MessageBox.Show("The Current Record Was deleted", "Delete Dialog Box", MessageBoxButtons.OK)

da.Update(ds, "AddressBook") MaxRows = MaxRows - 1

inc = 0 navigate()

End Sub

Private Sub clearbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearbut.Click

nametxt.Text = "" regtxt.Text = "" depttxt.Text = "" emailtxt.Text = ""

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

agetxt.Text = "" phnetxt.Text = "" semtxt.Text = ""

End Sub

Private Sub savebut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles savebut.Click

Dim cb As New OleDb.OleDbCommandBuilder(da) Dim dsNewRow As DataRow

dsNewRow = ds.Tables("AddressBook").NewRow() dsNewRow.Item(0) = nametxt.Text dsNewRow.Item(1) = Val(regtxt.Text) dsNewRow.Item(2) = depttxt.Text dsNewRow.Item(3) = emailtxt.Text dsNewRow.Item(4) = Val(agetxt.Text) dsNewRow.Item(5) = Val(phnetxt.Text) dsNewRow.Item(6) = Val(semtxt.Text) ds.Tables("Addressbook").Rows.Add(dsNewRow) da.Update(ds, "AddressBook")

MsgBox("New Record added to the Database") MaxRows = MaxRows + 1

savebut.Enabled = False addbut.Enabled = True updatebut.Enabled = True delbut.Enabled = True

End Sub

Private Sub exitbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitbut.Click

End

End Sub

Private Sub updatebut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updatebut.Click

Dim cb As New OleDb.OleDbCommandBuilder(da) Dim dsNewRow As DataRow

ds.Tables("AddressBook").Rows(inc).Item(0) = nametxt.Text ds.Tables("AddressBook").Rows(inc).Item(1) = Val(regtxt.Text) ds.Tables("AddressBook").Rows(inc).Item(2) = depttxt.Text ds.Tables("AddressBook").Rows(inc).Item(3) = emailtxt.Text ds.Tables("AddressBook").Rows(inc).Item(4) = Val(agetxt.Text)

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

ds.Tables("AddressBook").Rows(inc).Item(5) = Val(phnetxt.Text) ds.Tables("AddressBook").Rows(inc).Item(6) = Val(semtxt.Text) da.Update(ds, "AddressBook")

MsgBox("Data was updated") End Sub

Private Sub cancelbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cancelbut.Click

savebut.Enabled = False addbut.Enabled = True updatebut.Enabled = True delbut.Enabled = True cancelbut.Enabled = False inc = 0

navigate() End Sub

OUTPUT:

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

RESULT:

Thus the program for developing student detail using .NET is executed successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Ex.No:6INVOKE EJB COMPONENTS AS WEB SERVICES

AIM:

To invoke EJB component as web service using Netbeans IDE.

PROCEDURE:

Start => all programs => netbeans IDE.

Select filename => new project =>java EE => enterprise application.

Give the project name as test service select the glass fishv2.1 server.

Select the test service EJB right click and select new session.

Give the EJB name as test service EJB right click and select session type as stateless and interface as remote. Give the package name as test package and click the finish button.

Select test service EJB because class insert the business method Get message().

Insert the following code inside the get message() method return Helloworld.

Right click select insert code option => add business method, give the name as get message() return type as string.

Select index.jsp from testservice.war

Insert the following code into the index.jsp

Select the file => right click => servlet => package name as servlet package =>finish.

Inside the servlet class right click select insert code => call enterprise bean =>select and service EJB and click ok.

Add the following code outprintln testservice bean get message and click clean and deploy.

PROGRAM: ejbsessionBean.java

package pac;

import javax.ejb.Stateless; @Stateless

public class ejbsessionBean implements ejbsessionRemote { public String getmessage() {

return "hello welcome";

}}

ejbservlet.java

package pac;

import java.io.IOException; import java.io.PrintWriter;

import javax.servlet.ServletException;

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*;

import javax.ejb.EJB; import javax.servlet.*; import javax.servlet.http.*;

import pac.ejbsessionRemote; import pac.ejbsessionBean;

public class ejbservlet extends HttpServlet { @EJB

private ejbsessionRemote ejbsessionBean;

protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8");

PrintWriter out = response.getWriter(); try {

out.println("");

out.println(""); out.println("Servlet ejbservlet"); out.println(""); out.println(""); out.println(ejbsessionBean.getmessage()); out.println(""); out.println("");

} finally { out.close();

}}

index.jsp

JSP Page

Hello World!

Click here to call the EJB component

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

ejbsessionRemote.java

package pac;

import javax.ejb.Remote; @Remote

public interface ejbsessionRemote { String getmessage();

}

Output:

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

RESULT:

Thus the invoking of EJB component as web service using net beans IDE was verified and executed successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Ex.No:7EJB COMPONENTS FOR FINDING POWER VALUE

AIM:

To write a program for EJP components for finding power value.

PROCEDURE:

Start-> All programs -> NetbeansIDE.

Select File menu-> New Project-> JavaEE-> Enterprise application.

Give the project name as powerservice select glassfish vs as server and click the finish button.

Select the powerservice EJB right click and select new sessionbean.

Give the EJB name as powerservice EJB and select sessiontype as stateless and interface as remote give the package name as mypack and click the finish that select.

Select powerservice EJB from that select powerservice EJBbean.java.

Inside the powerservice EJB bean class insert the business method find power.

Insert the following code inside the findpower() method.

Right click select insert code option-> add business method give the name as findpower return type as int.

Add the doGET() code.

Clean and deploy and run the project.

PROGRAM: powersessionBean.java: package powerpack;

import javax.ejb.Stateless;

public class powersessionBean implements powersessionRemote { public int findpower(int x, int y) {

int result=1; for(int i=0;i go to the New Project which is available under File menu. The New Project wizard opens.

Select the web from categories options and web application from project section and then press the next button.

On the next screen mention the project name, select the project location. Also mention the server name in which we want to deploy our web application

Mention the project name JCalcWebService ,use GlassFish V2 application server for deployment.

Click the finish button

Right click on the project name in the Projects explorer window.

From the context menu options select the Web Service menu. A web service dialog opens.

Mention the web service name and the package name and then click the finish button.

In this example the web service name is JSimpCalcWebService and the package name is calcpackage.

11. Add the following web service operation or WebMethod through design mode.

Addition(double parameter1,double parameter2)

Subtraction(double parameter1,double parameter2)

Multiplication(double parameter1,double parameter2)

Division(double parameter1,double parameter2)

Power(double parameter1,double parameter2)

Minimum(double parameter1,double parameter2)

Maximum(double parameter1,double parameter2)

Then write the code for all the webservice methods

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Deploy the application and test the webservice

Copy the URL of the WSDL file.

http://localhost:8080/ JCalcWebService / JCalcWebService Service?ws

Procedure for creating a .Net Client in ASP.Net using C#:

Create a ASP.net web site

Start Visual Studio 2008 go to the New Web Site ,which is available under File menu.

Select ASP.net Web Site.

Select the folder in which to create the web site as JSimpCalcWebServiceWebSite

Select the language as Visual C# and click OK button.

To Add the web reference ,mention the WSDL file in the web site. To add the web service reference perform the following steps:

Go to Solution Explorer window.

Right click on the project name (in this case its JSimpCalcWebServiceWebSite). A context menu pops up.

Click the Add Web Reference menu. The Add Web Reference dialog opens.

Copy and paste the WSDL URL from the web browers address to Add Web Reference dialogs address bar and press go button

Give a name to the web reference (in this example its JSimpCalcWebService) and click the Add Reference button.

Design an ASP.net page. The default fie name is Default.aspx

Induce the web reference in to the code (i.e. Default.aspx.cs). For example:

using JSimpCalcWe bServiceService;

Next, create the object of the web reference.

The add the following lines JSimpCalcWebServiceService.JSimpCalcWebServiceService proxy = new JSimpCalcWebServiceService.JSimpCalcWebServiceService();

Now, access the WebMethod like the following method call.

a. proxy.addition(10,20); similarly invoke for all the other methods.

Test web service client application by clicking on the Start Debugging toolbar button or pressing F5 key

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

PROGRAM: WEB SERVICE

package calc;

import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; @WebService()

public class JSimpCalcWebService { @WebMethod(operationName = "addition")

public String addition(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format((parameter1 + parameter2),0,6);

}

@WebMethod(operationName = "subtraction")

public String subtraction(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format((parameter1 - parameter2),0,6);

}

@WebMethod(operationName = "multiplication")

public String multiplication(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2")

double parameter2) {

return NumberFormater.format((parameter1 * parameter2),0,6);

}

@WebMethod(operationName = "division")

public String division(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format((parameter1 / parameter2),0,6);

}

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

@WebMethod(operationName = "power")

public String power(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format(Math.pow(parameter1, parameter2),0,6);

}

@WebMethod(operationName = "mininum")

public String mininum(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format(Math.min(parameter1, parameter2),0,6);

}

@WebMethod(operationName = "maxminum")

public String maxminum(@WebParam(name = "parameter1") double parameter1, @WebParam(name = "parameter2") double parameter2) {

return NumberFormater.format(Math.max(parameter1, parameter2),0,6);

}

}

WEB SITE: using System;

using System.Configuration; using System.Data;

using System.Linq; using System.Web;

using System.Web.Security; using System.Web.UI;

using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts; using System.Xml.Linq;

using JSimpCalcWebServiceService;

public partial class _Default : System.Web.UI.Page

{

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

JSimpCalcWebServiceService.JSimpCalcWebServiceService proxy; protected void Page_Load(object sender, EventArgs e)

{

proxy = new JSimpCalcWebServiceService.JSimpCalcWebServiceService();

}

protected void Button1_Click(object sender, EventArgs e)

{

resadd.Text="Result:" + proxy.addition(double.Parse(param1add.Text),double.Parse(param2add.Text));

}

protected void Button2_Click(object sender, EventArgs e)

{

ressub.Text = "Result: " + proxy.subtraction(double.Parse(param1sub.Text), double.Parse(param2sub.Text));

}

protected void Button3_Click(object sender, EventArgs e){

resmul.Text= "Result: " + proxy.multiplication(double.Parse(param1mul.Text), double.Parse(param2mul.Text));

}

protected void Button4_Click(object sender, EventArgs e)

{

resdiv.Text = "Result: " + proxy.division(double.Parse(param1div.Text), double.Parse(param2div.Text));

}

protected void Button5_Click(object sender, EventArgs e)

{

respow.Text= "Result: " + proxy.power(double.Parse(param1pow.Text), double.Parse(param2pow.Text));

}

protected void Button6_Click(object sender, EventArgs e)

{

resminmax.Text = "Result: " + proxy.mininum(double.Parse(param1ma.Text), double.Parse(param2ma.Text));

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

}

catch (FormatException)

protected void Button7_Click(object sender, EventArgs e)

{

resminmax.Text = "Result: " + proxy.maxminum(double.Parse(param1ma.Text), double.Parse(param2ma.Text));

}

}

OUTPUT:

RESULT:

Thus the invoking of J2EE web service in asp.net using c# was verified and executed successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

Ex.No:9

CREATE ADDITION WEBSERVICE IN ASP.NET INVOKE

IT IN USING C#

AIM:

To write a program for creation of addition webservice in ASP.NET in invoke it using c#.

PROCEDURE:

Start the program.

Create a new webservice using file->new website->ASP.NET wes service and then select c# language and then click ok.

Write the code for addition, then run the program.

Then copy the wsdlurl( http://localhost:1066/WebSite4/Service.asmx?wsdl).

Again create a new website using file->new website->ASP.NET web site then select c# language and then click ok.

Right click on the website then go to add web reference, paste the wsdl url( http://localhost:1066/WebSite4/Service.asmx?wsdl).

Then click go.

Give the reference name click ok.

Desing the form and add the coding.

Finally run the program.

PROGRAM:

WEB SERVICE: using System; using System.Linq; using System.Web;

using System.Web.Services;

using System.Web.Services.Protocols; using System.Xml.Linq;

[WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] uncomment the following line.

public class Service : System.Web.Services.WebService

{

public Service()

{

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

}

[WebMethod]

public string HelloWorld()

{

return "Hello World";

}

[WebMethod]

public string Addition(int a, int b)

{

int c = a + b;

return "Result:" + c;

}

}

WEB SITE using System;

using System.Configuration; using System.Data;

using System.Linq; using System.Web;

using System.Web.Security; using System.Web.UI;

using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts; using System.Xml.Linq;

using addservice;

public partial class _Default : System.Web.UI.Page

{

addservice.Service proxy;

protected void Page_Load(object sender, EventArgs e)

{

proxy = new addservice.Service();

}

protected void butadd_Click(object sender, EventArgs e)

{

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

rsltlbl.Text = proxy.Addition(int.Parse(Txt1.Text), int.Parse(Txt2.Text));

}

}

OUTPUT:

RESULT:

Thus the creation of addition of webservice in ASP.NET in invoke it using c# was verified and executed successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

EX.NO:10

INVOKING ASP.NET WEBSERVICE USING J2EE

AIM:

To write a program for invoking ASP.NET webservice using J2EE.

PROCEDURE:

Start the program.

Create a new webservice using file->new website->ASP.NET wes service and then select c# language and then click ok.

Write the code for addition, then run the program.

Then copy the wsdlurl( http://localhost:1066/WebSite4/Service.asmx?wsdl).

Open the netbeans goto file->new project->java web->java web application.

Give the name for project and click finish.

Right click the project goto new->web service client, select wsdl url option and then paste the url click finish.

Write the code in index file.

Again right click the project goto new->jsp file.

Give the name for jsp then click finish.

In the jsp file right click select call wes service-> select addition operation.

Include the coding in jsp file.

Finally deploye and run the file.

PROGRAM: WEBSERVICE

using System; using System.Linq; using System.Web;

using System.Web.Services;

using System.Web.Services.Protocols; using System.Xml.Linq;

[WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

[System.Web.Script.Services.ScriptService]

public class Service : System.Web.Services.WebService

{

public Service () {}

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

[WebMethod]

public string HelloWorld() { return "Hello World";

}

[WebMethod]

public string addition(int a,int b)

{

int c = a + b;

return "Result of addition is"+c;

}

[WebMethod]

public string subtraction(int a, int b)

{

int c = a - b;

return "Result of subtraction is" + c;

}

[WebMethod]

public string multiplication(int a, int b)

{

int c = a * b;

return "Result of multiplication is" + c;

}}

INDEX.JSP

JSP Page

Hello World!

Enter the num1:
Enter the num2:

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

SERV.JSP

JSP Page

Hello World!

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

OUTPUT:

RESULT:

Thus the invoking of ASP.NET webservice using J2EE was executed and verified successfully.

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

EX.NO:11 IMPLEMENTATION OF ORCHESTRATION WITH BPEL TO ADD TWO

NUMBERS

AIM:

To write a program for implementation of orchestration with BPEL to addition of two numbers using net bean6.5 IDE.

PROCEDURE:

PROCEDURE FOR CREATING ADDITION WEB SERVICE:

Open the net bean IDE. File->new project->java web->web application and click next.

Give the project name, then right click on the project and select new->web service give the web service name and click finish.

A new web service is created, then right on the web service and click an application give the operation name as add return type as int and two parameter.

Deploy the web service and then test web service.

PROCEDURE FOR CREATING A BPEL MODULE:

Open net bean IDE. Click on file->new->soa->bpel module. Right click on the project and create a new bpel process.

Drag the 0 item under web service in created service and drag to the partner link.

Create another partner link drag and drop the entities from the palette, receive1, assign1, invoke1, assing2, and reply in order.

Choose the partner link as partner link bpel and operation as add. Build the bpel project.

PROCEDURE FOR CREATING A COMPOSITE APPLICATION:

Click on new->project->soa->composite application. Right click on the project to add JBJ module. Create a new test case choose the operation to add. Then run the test case

PROGRAM:

ADD WEB SERVICE: package pck;

import javax.jws.WebService; @WebService()

public class calcService { public int add(int n1,int n2){ return n1+n2;

}}

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

CALCBPEL:

COMPOSITE BPEL:

WWW.VIDYARTHIPLUS.COM

V+ TEAM

WWW.VIDYARTHIPLUS.COM

INPUT.XML

2

3

OUTPUT.XML

2

3

RESULT:

Thus the implementation of orchestration with BPEL to addition of two numbers using net bean6.5 IDE was executed and verified successfully.

----------------***************-----------------

WWW.VIDYARTHIPLUS.COM V+ TEAM