Unit-1 1a) Benefits of XML
Unit-1 1a) Benefits of XML
The very nature of XML is that it is a structured document format that represents not only the
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 concentrate on using HTML for layout and display, and be sure that changes in the
With a few lines of JavaScript code, you can read an external XML file and update the data content
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.
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,
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
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
• XHTML
1) XSL
2) XFORMS
3) XHTML
What is XSLT?
XSLT stands for XSL Transformations. XSLT is the most important part of XSL. XSLT
transforms an XML document into another XML document. XSLT uses XPath to navigate in
XML documents. XSLT is a W3C Recommendation. We want to transform the following XML
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob
Dylan</artist><country>USA</country><company>Columbia</company><price>
10.90</price>
<year>1985</year>
</cd> . . .
</catalog>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template
match="/"> <html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Title</th>
<th align="left">Artist</th>
</tr>
<xsl:for-each
select="catalog/cd"> <tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr> </xsl:for-
each> </table>
</body> </html>
</xsl:template>
</xsl:stylesheet>
XFORMS:
XForms is the next generation of HTML forms. XForms is richer and more flexible
than HTML forms. XForms will be the forms standard in XHTML 2.0. XForms is platform and
device independent. XForms separates data and logic from presentation. XForms uses XML to
define form data. XForms stores and transports data in XML documents. XForms contains
features like calculations and validations of forms. XForms reduces or eliminates the need for
scripting. XForms is a W3C Recommendation. The XForms Model. The XForms model is used to
The XForms model is used to describe the data. The data model is an instance (a template)
of an XML document. The XForms model defines a data model inside a <model> element:
<model>
<instance>
<person>
<fname/>
<lname/>
</person>
</instance>
</model>
Example program:
<xforms>
<model>
<instance>
<person><fname/><lname/></person></instance>
</model>
ref="lname"><label>Last Name</label></input><submit
submission="form1"> <label>Submit</label>
</submit>
</xforms>
XHTML:
replace HTML. XHTML is almost identical to HTML 4.01. XHTML is a stricter and cleaner
Recommendation. XHTML elements must be properly nested. XHTML elements must always be
Example program:
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple
document</title> </head>
</html>
Unit-2
ThebasestackincludesthosetechnologiesnecessarytocreateandinvokeWebServices.
Services to be available to service requesters. Although HTTP is the defector standard network
protocol, The architect may consider any of a number of other options, including SMTP(fore-
mail),FTP, IIOP, or messaging technologies such as MQ. Some of these choices are request/response
based, whereas others are message based; furthermore, some are synchronuos, where as others are
asynchronous. The architect may find thatina large sys-tem, a combination of different network
protocols is appropriate
On top of the SOAP layer comes three layers that together form the service description.
WSDL is the de facto standard for service descriptions, with the addition of the still- tentative
WSEL for endpoint descriptions. The service interface definition contains the binding, portType,
message, and type elements, which form the portion of the service description that is reusable
The service implementation definition, however, contains those elements that are specific
to each implementation: the service and port elements. A third party (say, a standards body)
might specify the service interface definition for a particular type of Web Service, leaving the
description, which introduces semantics to the service descriptions that apply to a particular
implementation. Endpoint descriptions can contain security, QoS, and management attributes that
Once the architect has dealt with all the issues in the base stack, the Web Services are
essentially fully constructed. Next, the development team uses UDDI to publish the services to a
registry or another repository of information about available Web Services. Once Web Services
are published, UDDI can then be used to discover them in the registries.
2)The Deployment Architectural View:
The Deployment (or Physical) Architectural View maps the software to its underlying
platforms, including the hardware, the network, and the supporting software platforms. Today,
Web Services are hosted on application server platforms such as IBM‘s WebSphere, BEA‘s
WebLogic, and Microsoft‘s Windows 2000. There are many benefits to building Web Services on
top of platforms like these: They handle database access, load balancing, scalability, and interface
support as well as provide a familiar environment for dealing with hardware and network issues.
This model follows a traditional n-tier architecture, except that the Web server is also
responsible for sending and receiving the XML messages that form the Web Services interface.
The technology that supports Web Services is therefore already well under- stood; the
fundamental difference between Web Services and Web pages is that pages are intended for
humans to read, whereas Web Services expose an interface intended for machines.
Running Web Services off of Web servers is not the only way to support the services,
however. It is also possible to build Web Services on a peer-to-peer (P2P) developer model. P2P,
popularized by the Napster music service, is a distributed architecture that does not rely on central
servers but rather distributes responsibility to systems (called peers) in the network. Unfortunately,
P2P technologies are every bit as new and bleeding edge as Web Services, so only time will tell
which P2P models will become established. The self-organizing promise of Web Services does
lend itself to P2P, but a lot of work remains before we will see how this fascinating area will
develop.
Unit-3
Features of WSDL
WSDL is an XML-based protocol for information exchange in
decentralized and distributed environments.
WSDL definitions describe 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 Universal Description, Discovery,
and Integration (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'.
WSDL Usage
WSDL is often used in combination with SOAP and XML Schema
to provide web services over the Internet. A client program
connecting to a web service can read the WSDL to determine
what functions are available on the server. Any special datatypes
used are embedded in the WSDL file in the form of XML Schema.
The client can then use SOAP to actually call one of the functions
listed in the WSDL.
Definition
TargetNamespace
DataTypes
Messages
Porttype
Bindings
Service
example
<!-- WSDL definition structure -->
<definitions
name="Guru99Service"
targetNamespace=http://example.org/math/
xmlns=http://schemas.xmlsoap.org/wsdl/>
<!-- abstract definitions -->
<types> ...
<message> ...
<portType> ...
2)SOAP:
What is SOAP?
SOAP is an XML-based protocol for accessing web services over HTTP. It
has some specification which could be used across all applications.
SOAP is known as the Simple Object Access Protocol, but in later times
was just shortened to SOAP v1.2. SOAP is a protocol or in other words is
a definition of how web services talk to each other or talk to client
applications that invoke them.
Example program
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Tutorial Name" type="string"/>
<xsd:element name="Tutorial Description" type="string"/>
</xsd:sequence>
</xsd:complexType>
Advantages of SOAP