官术网_书友最值得收藏!

Types of web services

There are many types of web services which have evolved over time. Prominent ones are :

  • SOAP
  • UDDI
  • WSDL
  • REST

Out of these, SOAP became popular in the early 2000s, when XML was on the top wave. The XML data format is used by various distributed systems to communicate with each other. SOAP is too complex to implement. Criticizers of SOAP point out how bulky the SOAP HTTP request is.

A SOAP request usually consists of these three basic components:

  • Envelope
  • Header
  • Body

Just to perform an HTTP request and response cycle, we have to attach a lot of additional data in SOAP. A sample SOAP request looks like this:

POST /StockQuote HTTP/1.1
Host: www.stockquoteserver.com
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
SOAPAction: "Some-URI"

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is a standard example of SOAP from the W3C standard (https://www.w3.org/TR/2000/NOTE-SOAP-20000508/). If we observe carefully, it is in XML format, with special tags specifying the envelope and body. Since XML operates on a lot of namespaces to function, additional information comes into play. 

主站蜘蛛池模板: 成武县| 宁晋县| 鄂伦春自治旗| 五峰| 留坝县| 辽源市| 唐山市| 比如县| 罗源县| 东明县| 图木舒克市| 东城区| 蕉岭县| 乌兰察布市| 永德县| 杭锦旗| 开封县| 肇源县| 独山县| 大兴区| 婺源县| 古丈县| 湟源县| 延津县| 郎溪县| 屏山县| 华亭县| 康马县| 昂仁县| 庆云县| 南汇区| 青田县| 定日县| 福鼎市| 开原市| 东城区| 常德市| 调兵山市| 咸阳市| 长春市| 博爱县|