0% found this document useful (0 votes)
31 views

Copy Experiment 2

The document describes Experiment 2 from a student on implementing a WSDL web service for addition. The student created a Java web application project in NetBeans with a web service that defines an operation called "sum" to add two integer parameters and return the result. The student was able to successfully run the web application on Glassfish server and test the WSDL service by invoking the "sum" operation and observing the SOAP request and response in XML.

Uploaded by

Rithik Chaudhary
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Copy Experiment 2

The document describes Experiment 2 from a student on implementing a WSDL web service for addition. The student created a Java web application project in NetBeans with a web service that defines an operation called "sum" to add two integer parameters and return the result. The student was able to successfully run the web application on Glassfish server and test the WSDL service by invoking the "sum" operation and observing the SOAP request and response in XML.

Uploaded by

Rithik Chaudhary
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 2

Student Name: Hrithik UID: 19BCS1856


Branch: CSE Section/Group: CSE 23B
Semester: 7 Date of Performance: 26-08-2022
Subject Name: Web Services Security Lab Subject Code: CSB-422

1. Aim/Overview of the practical: Write a program to implement WSDL Services (Addition


operation).

2. Software Required / Logistics used:

NetBeans IDE v8.0.2, Glassfish Server, Java Development Kit, Web Browser

3. Theory:

WSDL stands for Web Service Description Language. WSDL is written in XML and is used to
describe Web Services. A WSDL document defines services as collections of network
endpoints, also known as ports. In WSDL, the abstract definition of endpoints and messages is
separated from their concrete network deployment or data format bindings. This allows the
reuse of abstract definitions: messages, which are abstract descriptions of the data being
exchanged, and port types which are abstract collections of operations. The concrete protocol
and data format specifications for a particular port type constitutes a reusable binding. A port is
defined by associating a network address with a reusable binding, and a collection of ports
define a service. Hence, a WSDL document uses the following elements in the definition of
network services:

 Types– a container for data type definitions using some type system (such as XSD).
 Message– an abstract, typed definition of the data being communicated.
 Operation– an abstract description of an action supported by the service.
 Port Type–an abstract set of operations supported by one or more endpoints.
 Binding– a concrete protocol and data format specification for a particular port type.
 Port– a single endpoint defined as a combination of a binding and a network address.
 Service– a collection of related endpoints.

4. Steps for experiment/practical/Code:

i. Click on files in top left corner and choose new project. Choose “Java Web” as
category and “Web Application” as project. Enter a project name of your choice. You
need not change anything else and just finish creating the project.
ii. Once the project is created, right click on your project, choose New->Web Service.
Give the Web Service a suitable name, and choose the package as “si.com”. Finish
creating the Web Service.
iii. Now go to Projects->Web Services->NewWebService. Create a new operation named
sum with two integer parameters, that returns sum of both the parameters.
iv. Now run the Web Application. To run the Web Application, right click->Build,
followed by right click->Deploy, followed by right click->Run.
v. A web server is deployed at your local system. Go to localhost:8080. Click on the first
link, i.e., “go to administration console”.
vi. Click on Applications in left hand side list and open the Web Application we created.
Scroll down and click on the last link, i.e., “View Endpoint”.
vii. Click on the Tester link, and click on the test link. Enter the two numbers in the text
box and click on sum button. You will get a sum method invocation and the SOAP
Request and Response accordingly.
Notice that the SOAP request and response is in XML.

5. Output:
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1.
2.
3.

You might also like