0% found this document useful (0 votes)
5 views18 pages

Practical 1

The document outlines a practical assignment for implementing a web service using NetBeans for the Cloud Computing course. It provides step-by-step instructions for creating a web application, adding Java packages, creating web services, adding operations, and testing the web service. Additionally, it includes guidance on creating a Java client to invoke the web service operations.

Uploaded by

MR.GAURAV 007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

Practical 1

The document outlines a practical assignment for implementing a web service using NetBeans for the Cloud Computing course. It provides step-by-step instructions for creating a web application, adding Java packages, creating web services, adding operations, and testing the web service. Additionally, it includes guidance on creating a Java client to invoke the web service operations.

Uploaded by

MR.GAURAV 007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

[ 2CEIT603: CLOUD COMPUTING]

AY 2024-2025

Practical: 1

AIM- Web Service Implementation

Submitted by: Gaurav Akabari


Enrollment number: 22012021001

Department of Information Technology


22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
1) Create Web Application in NetBeans
File > New Project > Java Web > Web Application

Click Next and Finish.

Page 2 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
2) Create Java Packages from
Web Application > Source Packages > New > Java Package

3) Specify Name of Java Package and click on Finish Button

Page 3 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
4) Right Click on Package and create web service
New > Web Service

5) Specify Name of Web service and select Java Package

Page 4 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

6) Under Web Services Folder Select Web service and Right click > Add Operation

Page 5 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
7) Add Operation
Specify Name of Operation and click on OK

8) You May also add operation with parameters

Page 6 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

9) Modify Method according to requirement.. like I want to return string is UVPCE


and perform sum operation then code

Page 7 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

Page 8 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

Page 9 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
10) Deploy Project

For Successful deployment

11) Test Web Service

Page 10 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

Output of Test Web service in web Browser

Page 11 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

Given Input SOAP Request:

Page 12 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

12) Click on WSDL File Link and copy newly open window URL

Page 13 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
13) Create Simple Java Application from File > New > Java > java Application

14) Specify Name and Finish

Page 14 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

15) Add Web Service Client from Client Project > Source Package > New > Web
Service Client

16) Add WSDL and click on Finish

Page 15 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
17) Open code of java file and Right click > Insert Code

Then Select Call Web Service Operation

18) Select Operation from Web Service

Page 16 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

19) You may Invoke multiple operation one by one

20) Modify code of Main Method in webClient.java

Page 17 of 18
22012021001 6CEIT-C1 Gaurav Akabari
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------

21) Run Client Java File

Page 18 of 18

You might also like