Applying XML
XML and Web Services
• XML web services are basic building blocks in the
era of distributed computing
• Demand for XML web services:
– Open standards focuses on communication and
collaboration between people and applications
– Web services have become an platform for the
application integration
– Applications have been developed with multiple XML
web services from various sources work together
regardless of where these services resides and how
these services are implemented.
Contd..
• XML Web services
– Work with standard web protocols like XML, HTTP and TCP/IP
– exposes many functionality to the user through the web
protocol (SOAP).
– provides a means to describe their interfaces, which allows
the user to build a client application to interact with them and
described in document called WSDL
– must be registered so that users can find them and done
through UDDI.
– allows programs written in different language and in different
architecture to communicate with one another in a standard
way.
• XML web service is defined as the software service
exposed on the web through the SOAP protocol and
described with a WSDL file and registered in the UDDI
Contd..
• Examples:
– Stock Quotes
– Weather Forecasts
– Sports Scores
– Calendar Service
• These services can be accessed freely whereas some might
require a subscription to the service
• Makes the programmatic access easier and much more reliable.
• Exposing existing applications as a web service allows users
rapidly to develop new applications based on these web
services.
– For e.g., a web service for purchasing application is developed where
in which this application obtains the price info from a variety of
vendors, allowing the user to select a specific vendor, submitting the
order and then track the shipment details until it is received
– This might in turn use another web service to check the customers
credit, manage the customer’s account.
SOAP (Simple Object Access Protocol)
• A communication protocol for Web services.
• A specification which defines the XML format for
messages.
• SOAP message contains the callable function,
parameters required to pass the function which is sent
from the client and the server returns the message
with the results
• SOAP tool kits will translate the function calls from
some language to a SOAP message.
– For example Apache tool kit translates the java function
calls in to SOAP messages
• SOAP is been implemented on many different
hardware and software platforms.
WSDL (Web Services Description
Language)
• WSDL file describes the message formats and how
these messages are exchanged.
• It is based on the XML schema standard which
makes the web services interfaces accessible from
variety of platforms and programming languages.
• It also defines where the services are available,
what communication protocol is used.
UDDI
• UDDI stands for Universal Discovery Description and
Integration.
• It is like the yellow pages for the Web services.
• Yellow pages are used to search for the company that offers
services we need, read the services offered and contact
someone for more info.
• UDDI directory includes several ways to search for the services
that we need to build our applications.
• Web services can be offered without registering it in the UDDI,
but UDDI is required for the customers to find you.
• For e.g., we can search for providers of a service in a specified
geographic location or for business of a specified type.
• The UDDI directory will then supply info, contacts, links, and
technical data to allow us to evaluate which services meet our
requirements.
Web service Architecture
HTML with XML
• Data in XML can be described by itself.
• The question of how data is loaded to the application and
displayed to the user is left to the application program.
• Normally web application allows user to display the stored
data through web browser.
• XML data can also be transformed to HTML which can
then be viewed in the web page.
• The transformation of XML to HTML can be done in two
different ways
– DOM/SAX parser which helps in loading XML data into html
page and formatting it in to a HTML document.
– XSLT, which helps in describing the transformation rules from
XML to HTML and display it in the web page.
XSLT
• XSLT stands for Extensible Style sheet Language
Transformations
• XSLT is an XML-related Language which helps in
manipulating and transforming XML documents.
Contd..
XSLT Document
• The root element of the XSL document is
<xsl:stylesheet>
• To include the XSLT is XML document:
<?xml-stylesheet type="text/xsl" href=“filename.xsl"?>

Applying xml

  • 1.
  • 2.
    XML and WebServices • XML web services are basic building blocks in the era of distributed computing • Demand for XML web services: – Open standards focuses on communication and collaboration between people and applications – Web services have become an platform for the application integration – Applications have been developed with multiple XML web services from various sources work together regardless of where these services resides and how these services are implemented.
  • 3.
    Contd.. • XML Webservices – Work with standard web protocols like XML, HTTP and TCP/IP – exposes many functionality to the user through the web protocol (SOAP). – provides a means to describe their interfaces, which allows the user to build a client application to interact with them and described in document called WSDL – must be registered so that users can find them and done through UDDI. – allows programs written in different language and in different architecture to communicate with one another in a standard way. • XML web service is defined as the software service exposed on the web through the SOAP protocol and described with a WSDL file and registered in the UDDI
  • 4.
    Contd.. • Examples: – StockQuotes – Weather Forecasts – Sports Scores – Calendar Service • These services can be accessed freely whereas some might require a subscription to the service • Makes the programmatic access easier and much more reliable. • Exposing existing applications as a web service allows users rapidly to develop new applications based on these web services. – For e.g., a web service for purchasing application is developed where in which this application obtains the price info from a variety of vendors, allowing the user to select a specific vendor, submitting the order and then track the shipment details until it is received – This might in turn use another web service to check the customers credit, manage the customer’s account.
  • 5.
    SOAP (Simple ObjectAccess Protocol) • A communication protocol for Web services. • A specification which defines the XML format for messages. • SOAP message contains the callable function, parameters required to pass the function which is sent from the client and the server returns the message with the results • SOAP tool kits will translate the function calls from some language to a SOAP message. – For example Apache tool kit translates the java function calls in to SOAP messages • SOAP is been implemented on many different hardware and software platforms.
  • 6.
    WSDL (Web ServicesDescription Language) • WSDL file describes the message formats and how these messages are exchanged. • It is based on the XML schema standard which makes the web services interfaces accessible from variety of platforms and programming languages. • It also defines where the services are available, what communication protocol is used.
  • 7.
    UDDI • UDDI standsfor Universal Discovery Description and Integration. • It is like the yellow pages for the Web services. • Yellow pages are used to search for the company that offers services we need, read the services offered and contact someone for more info. • UDDI directory includes several ways to search for the services that we need to build our applications. • Web services can be offered without registering it in the UDDI, but UDDI is required for the customers to find you. • For e.g., we can search for providers of a service in a specified geographic location or for business of a specified type. • The UDDI directory will then supply info, contacts, links, and technical data to allow us to evaluate which services meet our requirements.
  • 8.
  • 9.
    HTML with XML •Data in XML can be described by itself. • The question of how data is loaded to the application and displayed to the user is left to the application program. • Normally web application allows user to display the stored data through web browser. • XML data can also be transformed to HTML which can then be viewed in the web page. • The transformation of XML to HTML can be done in two different ways – DOM/SAX parser which helps in loading XML data into html page and formatting it in to a HTML document. – XSLT, which helps in describing the transformation rules from XML to HTML and display it in the web page.
  • 10.
    XSLT • XSLT standsfor Extensible Style sheet Language Transformations • XSLT is an XML-related Language which helps in manipulating and transforming XML documents.
  • 11.
  • 12.
    XSLT Document • Theroot element of the XSL document is <xsl:stylesheet> • To include the XSLT is XML document: <?xml-stylesheet type="text/xsl" href=“filename.xsl"?>