What is webservices ?
It's a simple xml based information exchange system, which uses internet for direct interaction between applications.
Components of webservice :
SOAP : Simple object access protocol
UDDI : Universal description and discovery integration.
WSDL :web services descriptive language.
Note : WSDL is a language , used by UDDI.
What is SOAP ?
It is technology which allow communication between different languages. It allow us to pass the data over the internet in easy way.
A simple definition :
SOAP stands for Simple Object Access Protocol.
SOAP can interact with other programming language applications.
It is a just protocol which is XML Based for accessing web services over the internet.
It is recommended by W3C for communication between two application over the network.
Advantage of SOAP :
SOAP has its own security known as WS Security.
Language and platform independent.
Disadvantage of SOAP :
It support only XML format, it has many standards which we have to follow while working with SOAP UI so that the reason it is slow.
It works with WSDL file onle so we can not use other format like JSON, header , Cookies and so on.
What is REST ?
RESTFUL WEB SERVICES :
REST stands for Representational State Transfer
It is platform dependent
It support multiple format like Json, HTML, XML, Plain text file too.
It is fast as compared to SOAP.
It is not a protocol like SOAP it is just a architectural design.
How WebServices works ?
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.
OR In another way
Used XML for tagging >> Transfer it to SOAP >> WSDL to get the availabilities of services.
A simple definition: A web service is a function that can be accessed by other programs over the web (Http). To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser. A web service is not targeted at humans but rather at other programs.
Example: I can go to maps.google.com, and type in my home address, and see a map of where I live in my browser.
But what if you were writing a computer program where you wanted to take an address and show a pretty map, just like Google maps?
Well, you could write a whole new mapping program from scratch, OR you could call a web service that Google maps provides, send it the address, and it will return a graphical map of the location, which you can display in your program.
API vs WebService
API and web service both used for communication.
The only difference is that a Web service facilitates interaction between two machines over a network. An API acts as an interface between two different applications so that they can communicate with each other. An API is a method by which the third-party vendors can write programs that interface easily with other programs.
1. All Web services are APIs but all APIs are not Web services.
as all tigers are cats but not all cats are tiger
2. Web services might not perform all the operations that an API would perform.
3. A Web service uses only three styles of use: SOAP, REST and XML-RPC for
communication whereas API may use any style for communication.
4. A Web service always needs a network for its operation whereas an API doesn’t need
a network for its operation.
SOAP Vs REST
SOAP is Simple Object Access Protocol
Request and Response > XML Format
Uses Web Services and more secure.
Representational State Transfer,
Each URI is representational of some object.
Uses Http get/post/put/delete and uses XML/json/html format
Totally stateless and light weight than soap
Not a protocol rather a architechtural style.
What is URI ?
URI : Uniform Resource Identifier
Identifyng documents using a short of numbers, letters and symbol.
URL and URN A URN(Uniform Resource Name) ia an internet resource with a name.
WSDL Vs WADL
WSDL : The web service description language(WSDL) is an XML vocabulary used to describe SOAP-based web services.
WSDL files that we will be using for SOAP based web services only.
It's major elements are :
Definition : root element of all WSDL documents, It defines the name of the web service, declares multiple namespaces used throughout the remainder of the document, and contains all the service elements described here.
Datatype : The data types to be used in the messages are in the form of XML schemas.
Message : It is an abstract definition of the data, in the form of a message presented either as an entire document or as arguments to be mapped to a method invocation.
Binding : It is the concrete protocol and data formats for the operations and messages defined for a particular port type.
Operation : It is the abstract definition of the operation for a message, such as naming a method, message queue, or business process, that will accept and process the message.
Port : It is a combination of a binding and a network address, providing the target address of the service communication.
Service : It is a collection of related end-points encompassing the service definitions in the file; the services map the binding to the port and include any extensibility definitions.
WADL : The web application descrition language(WADL) is an XML vocabulary used to describe RESTful web services and
XML vocabulary for expressing the behaviour of HTTP resources.
main porpose to define the contact.