Web Service tutorial

In this web service tutorial, we will see the introduction to web services and some jargons of web services.

Web service Tutorial Content:

Web service is a way of communication that allows interoperability between different applications on different platforms, for example, a java based application on Windows can communicate with a .Net based one on Linux. The communication can be done through a set of XML messages over HTTP protocol.Web services are browsers and operating system independent service, which means it can run on any browser without the need of making any changes. Web Services take Web-applications to the Next Level.

The World Wide Web Consortium (W3C) has defined the web services. According to W3C, “Web Services are the message-based design frequently found on the Web and in enterprise software. The Web of Services is based on technologies such as HTTP, XML, SOAP, WSDL, SPARQL, and others.”
Let’s say, you are a java developer and you can publish your functions on internet or LAN through java web service so any other developer(let’s say .Net developer) can access your function.

You can go through web services interview questions for interview questions on web services.

Why you need to learn web services:

Reuse already developed(old) functionality into new software:

Let’s understand with the very simple example.Let’s say you are developing a finance software for a company on java and you have old .net software which manages salary of employees.So rather then developing new software for employee part, you can use old software and for other parts like infrastructure, you can develop your own functionalities.

Usability :

Web Services allow the business logic of many different systems to be exposed over the Web. This gives your applications the freedom to chose the Web Services that they need. Instead of re-inventing the wheel for each client, you need only include additional application-specific business logic on the client-side. This allows you to develop services and/or client-side code using the languages and tools that you want.

Interoperability :

This is the most important benefit of Web Services. Web Services typically work outside of private networks, offering developers a non-proprietary route to their solutions.Web Services also let developers use their preferred programming languages. In addition, thanks to the use of standards-based communications methods, Web Services are virtually platform-independent.

Loosely Coupled:

Each service exists independently of the other services that make up the application. Individual pieces of the application to be modified without impacting unrelated areas.

Ease of Integration:

Data is isolated between applications creating ’silos’. Web Services act as glue between these and enable easier communications within and across organizations.

Deployability :

Web Services are deployed over standard Internet technologies. This makes it possible to deploy Web Services even over the firewall to servers running on the Internet on the other side of the globe. Also thanks to the use of proven community standards, underlying security (such as SSL) is already built-in.

Some jargons used in Web services:

Simple Object Access Protocol(SOAP):

SOAP is a protocol specification for exchanging structured information in the implementation of Web services in computer networks. It relies on XML as its message format.

Web Service Description Language(WSDL):

WSDL stands for Web Service Description Language. It is an XML file that describes
the technical details of how to implement a web service, more specifically the URI,
port, method names, arguments, and data types. Since WSDL is XML, it is both
human-readable and machine-consumable, which aids in the ability to call and bind to
services dynamically.

Elements of WSDL are:

Description:
It is the root element of a WSDL 2.0 file. It usually contains a set of namespace declarations which are used throughout the WSDL file. 

Types:
The WSDL types element describes the data types used by your web service.Data types are usually specified by XML schema.It can be described in any language as long as your web services API supports it.

Binding:
The WSDL binding element describes how your web service is bound to a protocol. In other words, how your web service is accessible. To be accessible, the web service must be reachable using some network protocol. This is called “binding” the web service to the protocol.

Interface:
The WSDL interface element describes the operations supported by your web service.It is similar to methods in programming language.The client can only call one operation per request.

Service:
It describes the endpoint of your web service. In other words, the address where the web service can be reached.

Endpoint:
The endpoint element describes the address of the web service. The endpoint binding attribute describes what binding element this endpoint uses.i.e. protocol with which you will access web service. The address attribute describes the URI at which you can access the service.

Message:
The message element describes the data being exchanged between the Web service providers and consumers.

Sample WSDL file:

Universal Description, Discovery and Integration(UDDI):

UDDI stands for Universal Description, Discovery, and Integration.It is a directory service. Web services can register with a UDDI and make themselves available through it for discovery

Web service design approaches:

Contract last or Bottom-up approach:
When using contract last approach, you first write your java code then you create web service contract(WSDL).There are various kinds of tools which can generate WSDL on the basis of java code.
Contract first or Top Down Approach:
It is reverse of contract first.Here you first define web service contract.You define all the elements of WSDL first then after that you create your java logic.

59 Comments

  1. Mayank Gupta April 8, 2013
    • Arunkumar January 17, 2014
    • B2info January 16, 2015
  2. Pasha April 19, 2013
  3. Paste June 4, 2013
  4. Ahmed Adel July 16, 2013
  5. Emanuel August 27, 2013
  6. vikas shukla August 30, 2013
    • pankaj pandey January 19, 2015
  7. arpit October 2, 2013
  8. mohasin October 6, 2013
  9. Java October 9, 2013
  10. rahmoh October 23, 2013
  11. bbaaaaavvvvv October 30, 2013
  12. sajid October 31, 2013
  13. Manik November 28, 2013
  14. swati December 13, 2013
  15. Madhuri January 9, 2014
  16. kiran January 11, 2014
  17. grrrrrrmeowww January 24, 2014
  18. Jagan April 1, 2014
  19. somesh April 2, 2014
  20. Istiaque April 15, 2014
  21. rajkiran June 3, 2014
  22. Mohamad Hagras June 14, 2014
  23. aaliatif99 June 17, 2014
  24. Ali Atif June 26, 2014
  25. Ali Atif June 26, 2014
  26. Haruni July 7, 2014
  27. Seweit Hotroyman August 22, 2014
  28. kishore September 19, 2014
  29. subash November 17, 2014
  30. Website Designing November 19, 2014
  31. Ramya November 25, 2014
  32. Harish December 21, 2014
  33. Nafisa January 5, 2015
  34. mani January 7, 2015
  35. Karina February 4, 2015
  36. asit May 9, 2015
  37. asit May 9, 2015
  38. asit May 9, 2015
  39. MAHORO Emmanuel June 12, 2015
  40. Meena July 2, 2015
  41. sushant July 23, 2015
  42. Toyota CAMRY October 2, 2015
  43. viet nam country October 7, 2015
  44. Pual Rhines October 22, 2015
  45. angga December 5, 2015
  46. gun December 5, 2015
  47. Madhuri December 18, 2015
  48. Karande Rahul February 23, 2016
  49. Badri March 13, 2016
  50. divya April 4, 2016
  51. Haak April 4, 2016
  52. selva April 5, 2016
  53. a1digitalsolutions July 29, 2016
  54. Ishrat Suthar August 29, 2016
  55. Vasumathy September 26, 2016
  56. maryam March 27, 2017

Add Comment