0% found this document useful (0 votes)
4 views19 pages

Unit 5 Web

The document provides an overview of XML (Extensible Markup Language), its applications, features, and advantages, emphasizing its role in data storage and transport for web applications. It discusses the differences between XML and HTML, the structure of XML documents, and the importance of XML in enabling data sharing across different systems. Additionally, it briefly covers web browsers, their functionalities, and popular examples.

Uploaded by

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

Unit 5 Web

The document provides an overview of XML (Extensible Markup Language), its applications, features, and advantages, emphasizing its role in data storage and transport for web applications. It discusses the differences between XML and HTML, the structure of XML documents, and the importance of XML in enabling data sharing across different systems. Additionally, it briefly covers web browsers, their functionalities, and popular examples.

Uploaded by

Sree Vani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT – V

Syllabus:
XML: defining data for web applications, basic XML, document
type definition, presenting XML, document object model. Web
Services

What is XML ? and its Applications.


 XML stands for Extensible Markup Language. It is a text-based markup
language derived from Standard Generalized Markup Language (SGML).
 Xml was designed to store and transport data
 Xml was designed to be both human and machine readable.
 Xml is often used for distributing data over the internet
 XML tags identify the data and are used to store and organize the data,
rather than specifying how to display it like HTML tags, which are used to
display the data.
 XML is not going to replace HTML in the near future, but it introduces new
possibilities by adopting many successful features of HTML.
There are three important characteristics of XML that make it useful in a variety of
systems and solutions −
 XML is extensible − XML allows you to create your own self-descriptive
tags, or language, that suits your application.
 XML carries the data, does not present it − XML allows you to store the
data irrespective of how it will be presented.
 XML is a public standard − XML was developed by an organization called
the World Wide Web Consortium (W3C) and is available as an open
standard.
XML Usage
A short list of XML usage says it all −
 XML can work behind the scene to simplify the creation of HTML documents
for large web sites.
 XML can be used to exchange the information between organizations and
systems.
 XML can be used for offloading and reloading of databases.
 XML can be used to store and arrange the data, which can customize your
data handling needs.
1
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 XML can easily be merged with style sheets to create almost any desired
output.
 Virtually, any type of data can be expressed as an XML document.

Applications of XML:
 There are countless number of application exist that use XML, here area few
examples of the current plat form and applications that are making of this
technology
 Cell phones, Fine converters, etc.,
 Cell phones
 XML data is sent some cell phones. The data is then formatted by the
specification of the cell phone software designer to display text or images
and even play sounds.
 File converters
 Many applications have been written to convert existing Documents into the
xml standard. An example is a pdf to xml converter
 Noise XML
 Converts xml documents into an audio format so that you can listen to an
xml documents.
Features and Advantages of XML
XML is widely used in the era of web development. It is also used to simplify data
storage and data sharing.
The main features or advantages of XML are given below.
1) XML separates data from HTML
If you need to display dynamic data in your HTML document, it will take a lot of
work to edit the HTML each time the data changes.
With XML, data can be stored in separate XML files. This way you can focus on
using HTML/CSS for display and layout, and be sure that changes in the underlying
data will not require any changes to the HTML.
With a few lines of JavaScript code, you can read an external XML file and update
the data content of your web page.
2) XML simplifies data sharing
In the real world, computer systems and databases contain data in incompatible
formats.
XML data is stored in plain text format. This provides a software- and hardware-
independent way of storing data.
This makes it much easier to create data that can be shared by different
applications.
3) XML simplifies data transport
One of the most time-consuming challenges for developers is to exchange data
between incompatible systems over the Internet.
Exchanging data as XML greatly reduces this complexity, since the data can be
read by different incompatible applications.

2
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
4) XML simplifies Platform change
Upgrading to new systems (hardware or software platforms), is always time
consuming. Large amounts of data must be converted and incompatible data is
often lost.
XML data is stored in text format. This makes it easier to expand or upgrade to
new operating systems, new applications, or new browsers, without losing data.
5) XML increases data availability
Different applications can access your data, not only in HTML pages, but also from
XML data sources.
With XML, your data can be available to all kinds of "reading machines" (Handheld
computers, voice machines, news feeds, etc), and make it more available for blind
people, or people with other disabilities.
6) XML can be used to create new internet languages
A lot of new Internet languages are created with XML.
Here are some examples:
o XHTML
o WSDL for describing available web services
o WAP and WML as markup languages for handheld devices
o RSS languages for news feeds
o RDF and OWL for describing resources and ontology
o SMIL for describing multimedia for the web
Differences between HTML and XML
The differences between HTML and XML
HTML XML
It stands for Hyper text markup It stands for Extensible markup
language language
It contain predefined tags It does not contain predefined
tags, User needs to create his own
tags
HTML is not case sensitive XML is case sensitive
Some tags require no closing tags All tags must be closed
It is used to develop static web It is used to develop Dynamic web
pages pages
HTML is an application of SGML XML is subset of SGML
HTML document no need of root XML document needs of root
element element
HTML Supports links and creating XML Supports links and creating
links is very ease. links is complex.
HTML Doesn’t Require CSS for its XML Requires CSS or XSL or DOM
display for its display
If HTML Code is not written If XML Code is not written
properly, it does not raise any properly, it raises error
error
3
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
HTML Document extension XML Document Extension is .XML
is .HTML
HTML is Designed for XML is designed for carry data
representation ordering the
product forms
Retrieve online information via It is designed to the self descript.
hyperlinks at the click of a button

Explain about defining data for web application.


Extensible Markup Language (XML) is used to describe data. The XML
standard is a flexible way to create information formats and electronically
share structured data via the public Internet, as well as via
corporate networks.
o XML code, a formal recommendation from the World Wide Web
Consortium (W3C), is similar to Hypertext Markup Language (HTML). Both
XML and HTML contain markup symbols to describe page or file contents.
HTML code describes Web page content (mainly text and graphic images)
only in terms of how it is to be displayed and interacted with.
o XML data is known as self-describing or self-defining, meaning that the
structure of the data is embedded with the data, thus when the data arrives
there is no need to pre-build the structure to store the data; it is dynamically
understood within the XML. The XML format can be used by any individual or
group of individuals or companies that want to share information in a
consistent way. XML is actually a simpler and easier-to-use subset of
the Standard Generalized Markup Language (SGML), which is the standard to
create a document structure.
o The basic building block of an XML document is an element, defined by tags.
An element has a beginning and an ending tag. All elements in an XML
document are contained in an outermost element known as the root
element. XML can also support nested elements, or elements within
elements. This ability allows XML to support hierarchical structures. Element
names describe the content of the element, and the structure describes the
relationship between the elements.
o An XML document is considered to be "well formed" (that is, able to be read
and understood by an XML parser) if its format complies with the XML
specification, if it is properly marked up, and if elements are properly nested.
XML also supports the ability to define attributes for elements and describe
characteristics of the elements in the beginning tag of an element.
o For example, XML documents can be very simple, such as the following:
<?xml version="1.0" standalone="yes"?>
<conversation>
<greeting>Hello, world!</greeting>
<response>Stop the planet, I want to get off!</response>
</conversation>
o Applications for XML are endless. For example, computer makers might
agree upon a standard or common way to describe the information about a
4
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
computer product (processor speed, memory size, and so forth) and then
describe the product information format with XML code. Such a standard way
of describing data would enable a user to send an intelligent agent (a
program) to each computer maker's Web site, gather data, and then make a
valid comparison.
o XML's benefits sometimes appeared revolutionary in scope shortly after it
was introduced. However, as a concept, it fell short of being revolutionary. It
also fell short of being the panacea. The over-application of XML in so many
areas of technology diminished its real value, and results in a great deal of
unnecessary confusion. Perhaps most damaging is the predictable behavior
of many vendors that look to recast XML using their own set of proprietary
extensions. Although some want to add value to XML, others seek only to
lock in users to their products.
o XML's power resides in its simplicity. It can take large chunks of information
and consolidate them into an XML document - meaningful pieces that
provide structure and organization to the information.
Write about basic XML
XML stands for Extensible Markup Language. It is a text-based markup language
derived from Standard Generalized Markup Language (SGML).
The following diagram depicts the syntax rules to write different types of
markup and text in an XML document.

Let us see each component of the above diagram in detail.


XML Declaration
The XML document can optionally have an XML declaration. It is written as follows

<?Xml version = "1.0" encoding = "UTF-8"?>
Where version is the XML version and encoding specifies the character encoding
used in the document.
Syntax Rules for XML Declaration
 The XML declaration is case sensitive and must begin with "<?Xml>" where
"xml" is written in lower-case.

5
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 If document contains XML declaration, then it strictly needs to be the first
statement of the XML document.
 The XML declaration strictly needs be the first statement in the XML
document.
 An HTTP protocol can override the value of encoding that you put in the XML
declaration.
Tags and Elements
An XML file is structured by several XML-elements, also called XML-nodes or XML-
tags. The names of XML-elements are enclosed in triangular brackets < > as
shown below −
<element>
Syntax Rules for Tags and Elements
Element Syntax − Each XML-element needs to be closed either with start or with
end elements as shown below −
<element>....</element>
Or in simple-cases, just this way −
<element/>
Nesting of Elements − An XML-element can contain multiple XML-elements as
its children, but the children elements must not overlap. I.e., an end tag of an
element must have the same name as that of the most recent unmatched start
tag.
The Following example shows incorrect nested tags −
<?Xml version = "1.0"?>
<contact-info>
<company>tutorialspoint
<contact-info>
</company>
The Following example shows correct nested tags −
<?Xml version = "1.0"?>
<contact-info>
<company>tutorialspoint</company>
<contact-info>
Root Element − An XML document can have only one root element. For
example, following is not a correct XML document, because both
the x and y elements occur at the top level without a root element −
<x>...</x>
<y>...</y>
The Following example shows a correctly formed XML document −
<root>
<x>...</x>
<y>...</y>
</root>
Case Sensitivity − The names of XML-elements are case-sensitive. That means
the name of the start and the end elements need to be exactly in the same case.
6
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
For example, <contact-info> is different from <Contact-Info>
XML Attributes
An attribute specifies a single property for the element, using a name/value pair.
An XML-element can have one or more attributes. For example −
<a href = "[Link]
Here href is the attribute name and [Link] is attribute
value.
Syntax Rules for XML Attributes
 Attribute names in XML (unlike HTML) are case sensitive. That
is, HREF and href are considered two different XML attributes.
 Same attribute cannot have two values in a syntax. The following example
shows incorrect syntax because the attribute b is specified twice

<a b = "x" c = "y" b = "z">....</a>
 Attribute names are defined without quotation marks, whereas attribute
values must always appear in quotation marks. Following example
demonstrates incorrect xml syntax

<a b = x>....</a>
In the above syntax, the attribute value is not defined in quotation marks.
XML References
References usually allow you to add or include additional text or markup in an
XML document. References always begin with the symbol "&" which is a reserved
character and end with the symbol ";". XML has two types of references −
 Entity References − An entity reference contains a name between the
start and the end delimiters. For example &amp; where amp is name.
The name refers to a predefined string of text and/or markup.
 Character References − These contain references, such as &#65;,
contains a hash mark (“#”) followed by a number. The number always
refers to the Unicode code of a character. In this case, 65 refers to alphabet
"A".
XML Text
The names of XML-elements and XML-attributes are case-sensitive, which means
the name of start and end elements need to be written in the same case. To avoid
character encoding problems, all XML files should be saved as Unicode UTF-8 or
UTF-16 files.
Whitespace characters like blanks, tabs and line-breaks between XML-elements
and between the XML-attributes will be ignored.

Write short notes on webbrowser?


 A web browser (commonly referred to as a browser) is a software
application for retrieving, presenting and traversing information resources on
the World Wide Web. An information resource is identified by a Uniform
Resource Identifier (URI/URL) that may be a web page, image, video or other
piece of content. Hyperlinks present in resources enable users easily to
navigate their browsers to related resources.

7
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 Although browsers are primarily intended to use the World Wide Web, they
can also be used to access information provided by web servers in private
networks or files in file systems.
 The most popular web browsers are Chrome, Safari, Opera and Firefox.
Features of Web Browsers
 Available web browsers range in features from minimal, text-based user
interfaces with bare-bones support for HTML to rich user interfaces
supporting a wide variety of file formats and protocols.
 Browsers which include additional components to support e-
ail, Usenet news, and Internet Relay Chat (IRC), are sometimes referred to as
"Internet suites" rather than merely "web browsers.
 All major web browsers allow the user to open multiple information resources
at the same time, either in different browser windows or in different tabs of
the same window.
 Major browsers also include pop-up blockers to prevent unwanted windows
from "popping up" without the user's consent.
 Most web browsers can display a list of web pages that the user
has bookmarked so that the user can quickly return to them. Bookmarks are
also called "Favorites" in Internet Explorer.
 In addition, all major web browsers have some form of built-in web
feed aggregator
 most browsers can be extended via plug-ins, downloadable components that
provide additional features.
The following are some of the popular web browsers used now a
days to retrieve information on the internet.
a) HotJava
b) Netscape Navigator
c) Internet Explorer.
d) Mozilla FireFox.
1)Hot Java:- Sun Micro systems designed a browser called HotJava that
enables the display of interactive content on the web. Hot Java is written
completely in Java and demonstrates the capabilities of the Java
programming language. The browser makes web more dynamic and
interactive.
2) Netscape Navigator:-
Netscape communication Corporation developed a browser called Netscape
Navigator to interact with the web. It is a general purpose browser that can
run Java applets. It supports many platforms to work on. It supports scripting
languages like JavaScript, Vbscript etc.
3) Internet Explorer:-
Microsoft developed another popular browser called Internet Explorer. It uses
a Just-In-Time(JST) compiler which greatly increases the speed of execution.
4) Mozilla Firefox:-
Mozilla Firefox is the one of the best browsers out there on market. And it’s
free. Though the unique development methods of Open source, they are able
to make a product with impressive speed and fewer bugs than programs
developd by traditional methods. Mozilla Firefox has a number of unique
features, and it is overall a good product.

8
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
Define XML document object model. Explain it’s Advantages
and disadvantages.
 Document Object Model (DOM) it is used for accessing documents like HTML
and XML
 The Document Object Model (DOM) is a programming API for HTML and XML
documents.
 It defines the logical structure of documents and the way a document is
accessed and manipulated.
 DOM defines the objects and properties and methods (interface) to access all
XML elements. It is separated into 3 different parts / levels −
1. Core DOM − standard model for any structured document
2. XML DOM − standard model for XML documents
3. HTML DOM − standard model for HTML documents
XML DOM is a standard object model for XML. XML documents have a hierarchy of
informational units called nodes; DOM is a standard programming interface of
describing those nodes and the relationships between them.
As XML DOM also provides an API that allows a developer to add, edit, move or
remove nodes at any point on the tree in order to create an application.
Following is the diagram for the DOM structure. The diagram depicts that parser
evaluates an XML document as a DOM structure by traversing through each node.

Advantages of XML DOM


The following are the advantages of XML DOM.
 XML DOM is language and platform independent.
 XML DOM is traversable - Information in XML DOM is organized in a
hierarchy which allows developer to navigate around the hierarchy looking
for specific information.
 XML DOM is modifiable - It is dynamic in nature providing the developer a
scope to add, edit, move or remove nodes at any point on the tree.
Disadvantages of XML DOM
 It consumes more memory when the XML structure becomes large as
program written once remains in memory all the time until and unless
removed explicitly.
 Its operational speed is slower due to the larger usage of memory.
 Stores the entire document in memory.
 As DOM was written for any language, method naming conventions don’t
follow standard Java programming conventions.

9
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
Example
Consider the DOM representation of the following XML document [Link].
<?xml version = "1.0"?>
<Company>
<Employee category = "technical">
<FirstName>Tanmay</FirstName>
<LastName>Patil</LastName>
<ContactNo>1234567890</ContactNo>
</Employee>
<Employee category = "non-technical">
<FirstName>Taniya</FirstName>
<LastName>Mishra</LastName>
<ContactNo>1234667898</ContactNo>
</Employee>
</Company>
The Document Object Model of the above XML document would be as follows −

From the above flowchart, we can infer −


 Node object can have only one parent node object. This occupies the
position above all the nodes. Here it is Company.
 The parent node can have multiple nodes called the child nodes.
These child nodes can have additional nodes called the attribute nodes. In
the above example, we have two attribute nodes Technical and Non-
technical. The attribute node is not actually a child of the element node, but
is still associated with it.
 These child nodes in turn can have multiple child nodes. The text within the
nodes is called the text node.
 The node objects at the same level are called as siblings.
 The DOM identifies −
o the objects to represent the interface and manipulate the document.
o the relationship among the objects and interfaces.

Document Type Definition: (DTD)


(vimp)
10
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 It is used to define the basic building block of any xml documents.
 It is a XML technique to define the structure of XML document.
 It is a text based document with .dtd extension.
 DTD contains element declarations, attribute declarations, entity reference
declarations.
 Basically DTD is used to specify the set of “rules” for structuring data in xml
file
For Example:
If we want to put some information about students in xml file then
Generally we use tag Student followed by
Name, address, standard, marks,
That means we are actually specifying the manner by which the information should
be arranged in the xml file and for this purpose the DTD is used
Various Building blocks of XML
The building blocks of XML are elements, attributes, cdata, pcdata
Elements:
The basic entity is element
The elements are used for defining the tags
The elements consist of opening and closing tag
Mostly only one element is used to define single tag
All DTD element declarations have this general form:
Syntax:
<!element element-name (content model)>
EX:
<!element employee (empno,ename,esalary,…….)>
Ex:-
<! ELEMENT employee(empno,ename,salary)]
<!ELEMENT empno(#PCDATA)>// #PCDATA it is a datatype used for only elements
<!ELEMENT ename(#PCDATA)>
<!ELEMENT esalary(#PCDATA)>//PCDATA stands for parsable character data
In the content model 5 types of element declarations are possible.
1) Text only:- If any element allows only the text data is called text only
element
2) Child only:- If any element allows only the child elements then that
element is called child only element.
3) Empty Element:- This is a special case of element declaration. This
element declaration does not contain any content. These are declared
with the keyword EMPTY.
Syntax
Following is the syntax for empty element declaration:
<!ELEMENT elementname EMPTY >

11
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
4) Any Element:- You can declare an element using the ANY keyword in
the content. It is most often referred to as mixed category element.
Syntax
Following is the syntax for declaring elements with ANY content:
<!ELEMENT elementname ANY>
Here, the ANY keyword indicates that text (PCDATA) and/or any
elements declared within the DTD can be used within the content of
the <elementname> element.
5) Mixed element:- This is the combination of (#PCDATA) and children
elements. PCDATA stands for parsed character data, that is, text that is
not markup.
Syntax: <!ELEMENT elementname (#PCDATA|child1|child2)*>
The operator (*) must follow the mixed content declaration if children
elements are included
Attributes:
The attributes are used to specify the values of the element
These are specified with in double quotes
Ex: <flagtype=”true”>
The type of attribute of the element flag is having the value “true”.
CDATA:
Cdata stands for character data
This character data will be parsed by the parser
PCDATA:
It stands for Parsed Character data
Any parsable character data should not contain the markup characters
The markup characters are < > or &
If we want to use less than, greater than or ampersand characters than make use
of &lt; &gt; or &amp
Why DTD is used
Even XML file can be written in different formats by different people.
To avoid this issue and to standardize the XML data in to one format DTD is used.
Types of DTD:
1. Internal DTD
2. External DTD
Internal DTD:
1. If we are writing the DTD with in the XML document is called internal DTD
 If the DTD is declared inline with in xml file
 It should be declared in a “doctype” definition
 The doctype definition is the first element in the document
 It is also called as root elemnt
Syntax: <!DoCTYPE root-element[DTD rules>]
Example
DTD:-
12
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
<!Doctype Student[
<!element Student (name,address, std, marks)>
<!element name (#pcdata)>
<!element address,(#pcdata)>
<!element Std(#pcdata)>
<!element markks(#pcdata)>
]>
For the above data we are writing XML data
Xml:-
<student>
<name> Anas</name>
<address>KNR</address>
<std>[Link]</std>
<marks>83 percent</marks>
</student>
Save this file [Link]
Internal DTD s are reusable.

External DTD:
 If we are writing the DTD in a separate text based document and if we are
linking with XML that DTD is called external DTD.
 In this type, an external dtd file is created and its name must be specified in
the corresponding xml file
 If the DTD is declared in a external file, the <!DOCTYPE> definition must
contain a reference to an external DTD.
Following xml document describes the use of external dtd
Step1:Creation of dtd file[[Link]]
Open some suitable text editor or notepad
Type following code into it

<!element Student (name,address, std, marks)>


<!element name (#pcdata)>
<!element address,(#pcdata)>
<!element Std(#pcdata)>
<!element markks(#pcdata)>

Now save this file as [Link]


Step2: creation of xml document
Xmldocument 5.1.0[[Link]]
Now create a xml document as follows
<?Xml version=”1.0”>
<!DOCTYPE root-element SYSTEM “[Link]”>
<student>
13
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
<name> Anas</name>
<address>KNR</address>
<std>[Link]</std>
<marks>83 percent</marks>
</student>
Q)Explain about Web services.
Web services are the standardized way of communicating different web-based
applications via network. By using Web services, your application can publish its
function or message to the rest of the world. Web services can communicate
with each other using XML file format without knowing how each other is
implemented. Web based applications are communicating using the concepts as
XML, SOAP, REST, WSDL and UDDI.
In other words a web service is a collection of open protocols and standards used
for exchanging data between applications or systems. Software applications
written in various programming languages and running on various platforms can
use web services to exchange data over computer networks like the Internet in a
manner similar to inter-process communication on a single computer. This
interoperability(e.g between Java and Pythan, or windows and Linux applications)
is due to the use of open standards.
Components of Web Services
The basic web services platform is XML + HTTP. All the standard web services
work using the following components –
 SOAP (Simple Object Access Protocol)
 UDDI (Universal Description, Discovery and Integration)
 WSDL (Web Services Description Language)
Web Service Working
A web service enables communication among various applications by using open
standards such as HTML, XML, WSDL, and SOAP. A web service takes the help of –
 XML to tag the data
 SOAP to transfer a message
 WSDL to describe the availability of service.
You can build a Java-based web service on Solaris that is accessible from your
Visual Basic program that runs on Windows.
You can also use C# to build new web services on Windows that can be invoked
from your web application that is based on JavaServer Pages (JSP) and runs on
Linux.
Example
Consider a simple account-management and order processing system. The
accounting personnel use a client application built with Visual Basic or JSP to
create new accounts and enter new customer orders.
The processing logic for this system is written in Java and resides on a Solaris
machine, which also interacts with a database to store information.
The steps to perform this operation are as follows –
 The client program bundles the account registration information into a SOAP
message.
 This SOAP message is sent to the web service as the body of an HTTP POST
request.

14
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 The web service unpacks the SOAP request and converts it into a command
that the application can understand.
 The application processes the information as required and responds with a
new unique account number for that customer.
 Next, the web service packages the response into another SOAP message,
which it sends back to the client program in response to its HTTP request.
 The client program unpacks the SOAP message to obtain the results of the
account registration process.
******
Define WebServices and their Advantages.
A web service is a collection of open protocols and standards used for exchanging
data between applications or systems. Software applications written in various
programming languages and running on various platforms can use web services to
exchange data over computer networks like the Internet in a manner similar to
inter-process communication on a single computer. This interoperability(e.g
between Java and Pythan, or windows and Linux applications) is due to the use of
open standards.
Here are the benefits of using Web Services −
Exposing the Existing Function on the network
A web service is a unit of managed code that can be remotely invoked using
HTTP, that is, it can be activated using HTTP requests. Web services allows you to
expose the functionality of your existing code over the network. Once it is
exposed on the network, other application can use the functionality of your
program.
Interoperability
Web services allow various applications to talk to each other and share data and
services among themselves. Other applications can also use the web services. For
example, a VB or .NET application can talk to Java web services and vice versa.
Web services are used to make the application platform and technology
independent.
Standardized Protocol
Web services use standardized industry standard protocol for the communication.
All the four layers (Service Transport, XML Messaging, Service Description, and
Service Discovery layers) use well-defined protocols in the web services protocol
stack. This standardization of protocol stack gives the business many advantages
such as a wide range of choices, reduction in the cost due to competition, and
increase in the quality.
Low Cost Communication
Web services use SOAP over HTTP protocol, so you can use your existing low-cost
internet for implementing web services. This solution is much less costly
compared to proprietary solutions like EDI/B2B. Besides SOAP over HTTP, web

15
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
services can also be implemented on other reliable transport mechanisms like
FTP.

Explain the components of web services.


Over the past few years, three primary technologies have emerged as worldwide
standards that make up the core of today's web services technology. These
technologies are discussed below.
XML-RPC
This is the simplest XML-based protocol for exchanging information between
computers.
 XML-RPC is a simple protocol that uses XML messages to perform RPCs.
 Requests are encoded in XML and sent via HTTP POST.
 XML responses are embedded in the body of the HTTP response.
 XML-RPC is platform-independent.
 XML-RPC allows diverse applications to communicate.
 A Java client can speak XML-RPC to a Perl server.
 XML-RPC is the easiest way to get started with web services.

SOAP
SOAP is an XML-based protocol for exchanging information between computers.
 SOAP is a communication protocol.
 SOAP is for communication between applications.
 SOAP is a format for sending messages.
 SOAP is designed to communicate via Internet.
 SOAP is platform independent.
 SOAP is language independent.
 SOAP is simple and extensible.
 SOAP allows you to get around firewalls.
 SOAP will be developed as a W3C standard.

WSDL
WSDL is an XML-based language for describing web services and how to access
them.
 WSDL stands for Web Services Description Language.
 WSDL was developed jointly by Microsoft and IBM.
 WSDL is an XML based protocol for information exchange in decentralized
and distributed environments.
 WSDL is the standard format for describing a web service.
 WSDL definition describes how to access a web service and what operations
it will perform.
 WSDL is a language for describing how to interface with XML-based services.
 WSDL is an integral part of UDDI, an XML-based worldwide business registry.
 WSDL is the language that UDDI uses.
 WSDL is pronounced as 'wiz-dull' and spelled out as 'W-S-D-L'.

UDDI
UDDI is an XML-based standard for describing, publishing, and finding web
services.

16
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
 UDDI stands for Universal Description, Discovery, and Integration.
 UDDI is a specification for a distributed registry of web services.
 UDDI is platform independent, open framework.
 UDDI can communicate via SOAP, CORBA, and Java RMI Protocol.
 UDDI uses WSDL to describe interfaces to web services.
 UDDI is seen with SOAP and WSDL as one of the three foundation standards
of web services.
 UDDI is an open industry initiative enabling businesses to discover each
other and define how they interact over the Internet.

Write about Web servers?


Web server is a computer where the web content is stored. Basically web server
is used to host the web sites but there exists other web servers also such as
gaming, storage, FTP, email etc.
Web site is collection of web pages while web server is a software that respond to
the request for web resources.
Web Server Working
Web server respond to the client request in either of the following two ways:
 Sending the file to the client associated with the requested URL.
 Generating response by invoking a script and communicating with database

 When client sends request for a web page, the web server search for the
requested page if requested page is found then it will send it to client with
an HTTP response.
 If the requested web page is not found, web server will the send an HTTP
response:Error 404 Not found.
 If client has requested for some other resources then the web server will
contact to the application server and data store to construct the HTTP response.
There are also different ways to request content from a web server. The most
common request is the Hypertext Transfer Protocol(HTTP), but there are also other
requests like the internet Message Access Protocol(IMAP) or the File Transfer
Protocol(FTP).
The primary function of a web server is to deliver web pages to client. This
means delivary of HTML documents and any additional content that may be
included by a document, such as images, style sheets and Java scripts.
17
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
A client, commonly a web browser or web crawler, initiates communication
by making a request for a specific resource using HTTP and the server responds
with the content of that resource, or an error message if unable to do so. The
resource is typically a real file on the servers secondary memory, but this is not
necessarily the case and depends on how the web server is implemented.
While the primary function is to serve content, a full of implementation of HTTP
also includes a way of receiving content forms. This feature is used for submitting
web forms, including uploading of files.
Many generic web servers also support server-side scripting e.g., Apache
HTTP server and PHP. This means that the behavior of the web server can be
scripted in separate files, while the actual server software remains unchanged.
Usually, this functionality is used to create HTML documents on-the-fly as opposed
to return documents. This is referred to as dynamic and static content respectively.
The former is primarily used for retrieving and/or modifying information in
databases. The latter is, however, typically much faster and easily catched.
Web servers are not only used for serving the world wide web, rather they
can also be found embedded in devices such as printers, routers, webcams and
serving only a local network. The web server may then be used as part of a system
for monitoring and/or administrating the device in question. This usually means
that no additional software has to be installed on the client computer, since only a
web browser is required.

Types of webservers:
Every Web server that is connected to the Internet is given a unique address made
up of a series of four numbers between 0 and 255 separated by periods. For
example, [Link] or [Link].
When you register a web address, also known as a domain name, such as
[Link] you have to specify the IP address of the Web server that will host the
site. You can load up with Dedicated Servers that can support your web-based
operations.
There are four leading web servers − Apache, IIS, lighttpd and Jagsaw. Apart from
these Web Servers, there are other Web Servers also available in the market but
they are very expensive. Major ones are Netscape's iPlanet, Bea's Web Logic and
IBM's WebSphere.
Apache HTTP Server
This is the most popular web server in the world developed by the Apache
Software Foundation. Apache web server is an open source software and can be
installed on almost all operating systems including Linux, Unix, Windows, FreeBSD,
Mac OS X and more. About 60% of the web server machines run the Apache Web
Server.
You can have Apache with tomcat module to have JSP and J2EE related support.

18
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati
You can have detailed information about this server at Apache HTTP Server
Internet Information Services
The Internet Information Server (IIS) is a high performance Web Server from
Microsoft. This web server runs on Windows NT/2000 and 2003 platforms ( and
may be on upcoming new Windows version also). IIS comes bundled with Windows
NT/2000 and 2003; Because IIS is tightly integrated with the operating system so it
is relatively easy to administer it.
You can have detailed information about this server at Miscrosoft IIS
lighttpd
The lighttpd, pronounced lighty is also a free web server that is distributed with
the FreeBSD operating system. This open source web server is fast, secure and
consumes much less CPU power. Lighttpd can also run on Windows, Mac OS X,
Linux and Solaris operating systems.
You can have detailed information about this server at lighttpd
Sun Java System Web Server
This web server from Sun Microsystems is suited for medium and large websites.
Though the server is free it is not open source. It however, runs on Windows, Linux
and Unix platforms. The Sun Java System web server supports various languages,
scripts and technologies required for Web 2.0 such as JSP, Java Servlets, PHP, Perl,
Python, Ruby on Rails, ASP and Coldfusion etc.
You can have detailed information about this server at Sun Java System Web
Server
Jigsaw Server
Jigsaw (W3C's Server) comes from the World Wide Web Consortium. It is open
source and free and can run on various platforms like Linux, Unix, Windows, Mac
OS X Free BSD etc. Jigsaw has been written in Java and can run CGI scripts and
PHP programs.

19
Prepared by [Link],[Link](CSE), Lecturer in computer science, SVDC,Titupati

You might also like