Web Services

Web service is a service offered by an electronic device to another electronic device, communicating with each other via the World wide web. In a web service, web technology such as the HTTP, originally designed for human-to-machine communication, is utilized for machine-to-machine communication, more specifically for transferring machine readable file formats such as XML and JSON. In practice, the web service typically provides an object-oriented web based interface to a database server, utilized for example by another web server, or by a mobile application, that provides a user interface to the end user. Another common application offered to the end user may be a mashup, where a web server consumes several web services at different machines, and compiles the content into one user interface.


Introduction to XML

What is XML?

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML
  • XML was designed to describe data
  • XML tags are not predefined. You must define your own tags
  • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
  • XML was designed to store, carry, and exchange data. XML was not designed to display data.

The main difference between XML and HTML

  • XML is not a replacement for HTML.
  • XML and HTML were designed with different goals:
  • XML was designed to describe data and to focus on what data is.
         HTML was designed to display data and to focus on how data looks.

The following example is a note to Tove from Jani, stored as XML:

<?xml version="1.0" encoding="ISO-8859-1"?>





<body>Don't forget me this weekend!</body>


How can XML be Used?

  • It is important to understand that XML was designed to store, carry, and exchange data. XML was      not designed to display data.
  • With XML, your data is stored outside your HTML.
  • With XML, data can be exchanged between incompatible systems.


XSLT Demonstration

XSL - More Than a Style Sheet Language


  • XSLT is a language for transforming XML documents.
    Think of XSL as a set of languages that can transform XML into XHTML, filter and sort XML data, define parts of an XML document, format XML data based on the data value, like displaying negative numbers in red, and output XML data to different media, like screens, paper, or voice. 
  • XPath is a language for defining parts of an XML document.
  • XSL-FO is a language for formatting XML documents 

Working of XSLT

XSLT Uses XPath

  • XSLT uses XPath to define the matching patterns for transformations.
  • If you want to study XPath first, please read our XPath Tutorial.

How does it Work?

In the transformation process, XSLT uses XPath to define parts of the source document that match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document. The parts of the source document that do not match a template will end up unmodified in the result document.


Get Ready for the test!

Q 1 - Which of the following is a benefit of using a web service?

  • 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.
  • Web services allow various applications to talk to each other and share data and services among themselves.
  • Web services use standardized industry standard protocol for the communication.
  • All of the above.

Q 2 - Which of the following role of web service architecture implements the service and makes it available on the Internet?

  • Service Provider
  • Service Requestor
  • Service Registry
  • None of the above.

Q 3 - Web services allow various applications to talk to each other and share data and services among themselves.

  • true
  • false

Q 4 - The Service provider provides a central place where developers can publish new services or find existing ones.

  • true
  • false

SopraSteria Logo is?

Fill In the blanks

Name of our organisation is

Match the following

  • Projects
  • Capability

Arrange in alphabetical order

  • America
  • Argentina
  • Australia


Course Completed