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

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. 

主站蜘蛛池模板: 沈丘县| 砀山县| 丽江市| 潮安县| 白城市| 肃南| 松阳县| 芦溪县| 麦盖提县| 图们市| 象州县| 平昌县| 长寿区| 平阳县| 罗平县| 奉化市| 浪卡子县| 汶川县| 宜州市| 老河口市| 鱼台县| 平谷区| 双桥区| 苏尼特左旗| 靖远县| 黎川县| 苍溪县| 子洲县| 婺源县| 柘城县| 峨眉山市| 科技| 诸城市| 洛南县| 平邑县| 旺苍县| 大悟县| 电白县| 新野县| 梁山县| 兴安盟|