Web Service Protocols Flashcards
GET Method
It is used to request data from a specific resource.
The data is sent directly into URL.
Never to be used on sensitive data!!
POST Method
It is used to send data to a server to create/update a resource.
The data sent to the server with POST is stored in the request body of the HTTP request. They are, therefore not visible to users.
POST is a little safer than GET, because the parameters are not stored in browser history or in web server logs.
Advantages of GET
- The URL parameters can be saved together with the website address.
- If necessary, a page can also be retrieved via the browsing history
Disadvantages of GET
- Lack of data protection
- The URL parameters are visible to everyone and stored unencrypted in the browser history
- Limited capacity of data length.
Advantages of POST
- It offers the necessary privacy
- The data is neither cached nor does it appear in the browsing history
- It’s very flexible: Users can transmit short texts, but also data of any size or type, such as photos or videos
Disadvantages of POST
• Unwanted duplicate orders for example if you go back as the form data must be resubmitted since it’s not saved anywhere
Web Services four main technologies
- XML(Extensible Markup Language) – Encode and organize the message
- SOAP(Simple Object Access Protocol) – Defines message standards and acts as message envelope
- WSDL(Web Service Description Language) – Describes a web service and its functions
- UDDI(Universal Description, Discovery and Integration Service) – Dynamically find other web services
AJAX
(Asynchronous Javascript and XML) – Creates more interactive web applications
JSON
(JavaScript Object Notation) – Alternative to XML use, faster and easier to handle
SOAP
Protocol which allows:
o Exchanging structured and typed information between peers
o Accessing services, objects and servers in a platform-independent manner
SOAP Structure
o SOAP Envelope: Required
o SOAP Header: Optional
o SOAP Body: Required
SOAP
Pro vs Cons
• Advantages of SOAP:
o Interoperability
o Extensibility
o Independent of platforms and programming languages
• Disadvantages:
o Lack of security
o Lack of efficiency
o Slow, because it uses XML format which must be parsed to be read
o It defines only syntax, not semantics of operations
o It does not really hide underlying message passing principle
REST
(Representational State Transfer)
It is a software archit4ecture style that relies on a stateless communication protocol, most commonly, HTTP.
It relies on four basic http operations: GET, POST, PUT, DELETE
REST
Pros vs. Cons
• REST Advantages: o It has a simple model o Caching is supported o Proven base stds: http, URI, MIME, XML o Scalability • REST Disadvantages: o Schema to represent all URIs is complex o Limited support for HTTP PUT & DELETE o No complex queries are supported