Web services and Transport layer protocols


















Image obtained from : http://www.highteck.net/images/45-Transport-layer.jpg

Because web services operate over internet the role of TCP/IP stack is aslo essential. In TCP/IP layers Transport layer protocols can play a huge role because it helps to move data between machines over internet.   

WS over Non-HTTP Protocols 

These include protocols like FTP, SMTP, POP like protocols.
WS can operate over these as well.
These are asynchronous (meaning request response doesn't happen immediately ) 

WS over HTTP 

This is the most WS protocol.
HTTP is text based.
HTTP is synchronous (meaning request reply can happen immediately)

HTTP request happens via verbs (GET, POST, PUT, DELETE, HEAD .........)

But not all the web services respond to HTTP verbs.

HTTP syntax
protocol :// [HOST] / [Resource root] / [Parameters - optional]
https://www.youtube.com/results?search_query=gangamstyle 

Response data over HTTP can be any format we request.

Ex if we request to send repnose data in XML data format, we can add request header 
ACCEPT : application/xml

Share:

0 comments: