web service printout

28
Dept. of MCA – Jain University 1 Web Services Lab NAME : CHAITHRA R DATE : 24-08-2015 ROLL NO: 13MCA60004 Program Name: Creation of addition web service STEPS Step 1: `File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Upload: rojin07

Post on 29-Jan-2016

29 views

Category:

Documents


0 download

DESCRIPTION

web

TRANSCRIPT

Page 1: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 1

Web Services Lab 12MCA507L 12MCA307L

NAME : CHAITHRA R DATE : 24-08-2015

ROLL NO: 13MCA60004

Program Name:

Creation of addition web service

STEPS

Step 1:

`File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Page 2: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 2

Web Services Lab 12MCA507L 12MCA307L

Step 2:

Left Panel->Right click on Web Pages->New->Web Service-> Web Service Name->Package->Finish

Page 3: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 3

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Left Panel->Right Click on AugAddWeb->Add Operation->Name->Add->Parameter a and b of type ineteger->ok

Page 4: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 4

Web Services Lab 12MCA507L 12MCA307L

Step 4:

In AugAddWeb.java add the code

Step 5:

Deploy project

Step 6:

Right click on AugAddweb->click TestWebService

Page 5: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 5

Web Services Lab 12MCA507L 12MCA307L

OUTPUT:

Page 6: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 6

Web Services Lab 12MCA507L 12MCA307L

Program Name:

Creation of web service client

STEPS

Step 1:

`File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Page 7: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 7

Web Services Lab 12MCA507L 12MCA307L

Step 2:

Left Panel->Right click on Web Pages->New->Web Service client-> Browse-> Select AugAddWeb->ok->Package-> Finish

Page 8: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 8

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Write a code in html File

Step 4:

Left Panel->Right Click on WebPages->New->JSP-> JSP Name->Finish

Step 5:

JSP Page->Right click->Select webserviceclientresources->Select Callwebserviceoperation->Select Augadd->ok

Page 9: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 9

Web Services Lab 12MCA507L 12MCA307L

Step 6:

Insert code in JSP page

Step 7:

Deploy the project

Page 10: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 10

Web Services Lab 12MCA507L 12MCA307L

Step 8:

Run the Project

OUTPUT:

OUTPUT:

Page 11: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 11

Web Services Lab 12MCA507L 12MCA307L

NAME : CHAITHRA R DATE : 24-08-2015

ROLL NO: 13MCA60004

Program Name:

Creation of web service client for finding factorial number

STEPS

Step 1:

`File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Page 12: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 12

Web Services Lab 12MCA507L 12MCA307L

Step 2:

Left Panel->Right click on Web Pages->New->Web Service-> Web Service Name->Package->Finish

Page 13: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 13

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Left Panel->Right Click on AugAddWeb->Add Operation->Name->Add->Parameter a of type ineteger->ok

Page 14: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 14

Web Services Lab 12MCA507L 12MCA307L

Step 4:

Add the code

Step 5:

Deploy project

Page 15: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 15

Web Services Lab 12MCA507L 12MCA307L

Step 6:

Right click on AugAddweb->click TestWebService

Creation of client

STEPS

Step 1:

`File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Page 16: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 16

Web Services Lab 12MCA507L 12MCA307L

Step 2:

Left Panel->Right click on Web Pages->New->Web Service client-> Browse-> Select AugAddWeb->ok->Package-> Finish

Page 17: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 17

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Add the code in HTML file

Step 4:

Left Panel->Right Click on WebPages->New->JSP-> JSP Name->Finish

Step 5:

JSP Page->Right click->Select webserviceclientresources->Select Callwebserviceoperation->Select Augadd->ok

Page 18: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 18

Web Services Lab 12MCA507L 12MCA307L

Step 6:

Insert the code in the JSP page

Step 7:

Right click on AugAddClient->Deploy

Page 19: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 19

Web Services Lab 12MCA507L 12MCA307L

Step 8:

Right click on AugAddClient->Run

OUTPUT:

NAME : CHAITHRA R DATE : 7-09-2015

ROLL NO: 13MCA60004

Program Name:

Creation of Login web service

STEPS

Step 1:

`File->New Project->Java Web->Web Application->Next->Project Name->Next-> Next->Finish

Page 20: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 20

Web Services Lab 12MCA507L 12MCA307L

Step 2:

Left Panel->Right click on Web Pages->New->Web Service-> Web Service Name->Package->Finish

Page 21: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 21

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Left Panel->Right Click on AugAddWeb->Add Operation->Name->Add->Parameter check and password of type String->ok

Step 4:

In AugAddWeb.java add the code

Page 22: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 22

Web Services Lab 12MCA507L 12MCA307L

Step 5:

Deploy project

Step 6:

Right click on AugAddweb->click TestWebService

OUTPUT:

Program Name:

Creation of Invoke EJB components as web services

Page 23: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 23

Web Services Lab 12MCA507L 12MCA307L

STEPS

Step 1:

`File->New Project->Java ->Java Application->Next->Project Name->Next-> Next->Finish

Step 2:

File->New Project->Java EE ->ejb Module->Next->Project Name->Next->Next->Finish

Page 24: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 24

Web Services Lab 12MCA507L 12MCA307L

Step 3:

Left Panel->Right click on ejb module and select new session bean->Name->Package->and select remote-> Finish

Step 4:

Add the code

Page 25: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 25

Web Services Lab 12MCA507L 12MCA307L

Step 5:

Select the code i.e. public int mul(inta,intb)

Step 6:

Left panel see for RemoteSep7 expand->and in multiplyRemote paste the code

i.e. public int mul(inta,intb)

Step 7:

Deploy the project

Step 8:

In the Project web service select the created service and right click on it and select test web service

OUTPUT:

Page 26: Web Service Printout

Dept. of MCA – Jain University Signature of Faculty 26

Web Services Lab 12MCA507L 12MCA307L