- XML
- JSON
Web Service - Key Terminologies
Request: i/p to web service
Response: o/p from web service
Message Exchange Format: format of request and response
Service Provider or Server: which hosts the web service.
eg. Web Service is a service provider
Service Consumer or Client: who consumes the web service
eg. Application A, JavaApplication, DotNetApplication, PHPApplication is a service consumer.
Contract b/w service provider and service consumer.
- One, weather service is exposed on the internet i.e. HTTP.
- HTTP is over the web like we use the URL in browser similarly Application_A will call web service.
- Two, weather service is exposed over the transport which is queue i.e. MQ.
- The service requester would place a message in the queue.
- The service provider would be listening on the queue.
- As soon as there's request on the queue it would take the request, do the processing of it, create the response and put it back in the queue.
- The service requester would get the response from the queue.
- The transport will be MQ, here it is WebSphere MQ
=================================================================
Types of Web Services
- SOAP
- REST
Introduction of SOAP Web Services
- SOAP defines a specific way of building web services.
- Here we use XML as a request exchange format.
- It defines the specific XML request and response structure.
- Format
- XML Request and Response
- Transport
- SOAP over MQ
- SOAP over HTTP
- Service Defination
- WSDL
- WSDL defines the end point i.e. where your service is exposed.
- It defines all the operations exposed
- get all codes details
- add a new course
- delete course
- Also, specifies the request and response structure.
Introduction to RESTful Web Service
- users are resource who are using it, Let Ram is a resource.
- specific TODO is a resource
- LIST of TODOs is also a resource.
- A resource has an URI (Uniform Resource Identifier)
- /user/ram/todos/1
- /user/ram/todos
- /user/ram
- Resources ca have different representations
- XML
- HTML
- JSON
- Create a User: POST /users
- Delete a User: DELETE /users/1
- Get all User: GET /users
- Get one Users: GET /users/1
- Data Exchange Format
- No restriction. JSON is popular
- Transport
- Only HTTP
- Service Defination
- No Standard. WADL/Swagger









