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

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. 

主站蜘蛛池模板: 宁城县| 专栏| 酒泉市| 武宁县| 通江县| 泾源县| 玛多县| 青海省| 福州市| 加查县| 沙湾县| 鄄城县| 天门市| 祁阳县| 三穗县| 天峨县| 东光县| 柯坪县| 安西县| 佛教| 朔州市| 阿鲁科尔沁旗| 佛冈县| 金堂县| 中宁县| 潞西市| 昌邑市| 凌海市| 饶平县| 辽宁省| 孝感市| 溧水县| 富民县| 衢州市| 台北市| 沾化县| 黄龙县| 杭锦旗| 长沙县| 兴安县| 巴马|