0% found this document useful (0 votes)
291 views27 pages

Webservices

Uploaded by

api-250285776
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
291 views27 pages

Webservices

Uploaded by

api-250285776
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 27

Web Services

Prepared by Krutik Patel


What are Web Services ?
- Means of exposing functionality or data over network.
What are Web Services ?
- Integration between application.
- Can be used by other applications.
- Not tied to any one operating system or programming language.
- Reusable application components.
Use of Web Services
- Payment Gateway integration for Ecommerce site.
- Google map for Real Estate site.
- SMS gateway integration.
- Weather forecast for a news or blog site.
Web Service Users
- Web Service Providers.


- Web Service consumers.
When we need to develop ws?
- When we will have plenty of presentation layers (Desktop, Mobile, Web
application) that needs to access the same data websevices are developed.
- Interoperability has the highest priority to develop web service.
Why Web Services ?
- Exposing the existing function or data on to network
- Connecting Different Applications ie Interoperability
- Standardize Protocols.
- Low cost of communication.
Example
- A simple Account management & order processing system.

Types of Web Services
- REST
- SOAP
SOAP A type of Web Service
- Web based applications that dynamically interact with other web
applications using open standars.
- Open Standards
* SOAP
* WSDL
* UDDI
- XML based information exchange system.
SOAP
- XML-based protocol for exchanging information.
- SOAP is for communication between applications.
- SOAP is a format for sending messages.
- SOAP is platform independent.
- SOAP is language independent.
SOAP Web Service Architecture
WSDL
- Stands for Web Services Description Language.
- Written in XML.
- Standard format for describing a web service.
- Used to describe web service.
- Used to locate web service.
UDDI
- UDDI stands for Universal Description, Discovery and Integration.
- Directory for storing information about web service.
- Platform independent, open framework.
- Uses WSDL to describe interfaces to web services.
REST
- Representational State Transfer
- REST is an architectural style where data and functionality are accessed as
URIs.
- Simple , Lightweight and Fast.
- No standards defined.You can send and receive data as JSON, XML or even
plain text.
- This Constrainst -
* Client - Server
* Cacheable
* Stateless
Client - Server
- No restrictions on the nature of client.
- No restriction on communication protocol.
- Separate data storage concerns.
- Establish a fundamental distributed architecture.
Stateless
- Each request from client to server must contain all of the information
necessary to understand the request.
- Statelessness ensures that each service consumer request can be treated
independently by the service.
Cacheability
- Data within response labeled as cacheable or non-cacheable.
- If cacheable , then a client can reuse that data for equivalent request.
- Improves efficiency.
- Reduces reliability.
REST Web Service Architecture
SOAP vs REST
Simplicity
REST
- Easy to build as it has no standards.
- Flexible to extend the functionality.
SOAP
- Complex to build as it has standardised protocols.
- Not Flexible to extend the functionality.
SOAP vs REST
Bandwidth
REST
- Can be short
- Lightweight
SOAP
- Requires an XML wrapper around every request and response.
- Heavy Payload.
SOAP vs REST
Data Formats
REST
- Allows different data formats like XML , JSON ,or even plain text.
SOAP
- Allows only XML data format.
SOAP vs REST
Security SOAP is more secure.
REST
- Easy to analyze intent of each message by HTTP command.
- Authorization and Authentication in Network Layer.
- Security provided by HTTPS which is point to ponit only.
SOAP
- Needs to look into SOAP envelope.
- Authorization and Authentication in Application Layer.
- Supports WS-Security.
Which is better ?
- Both SOAP & REST have some benefits and drawbacks.
SOAP
- Used when security is concerned.
- Use when you want a java client for your service.
REST
- Used when performance is concerned.
- Use when you are working with Javascript client.
- Both of them will be better based on your requirement.
Questions
?

You might also like