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

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. 

主站蜘蛛池模板: 龙江县| 江油市| 黄龙县| 铅山县| 商丘市| 措勤县| 色达县| 湟中县| 元阳县| 精河县| 宜昌市| 中西区| 玛多县| 夹江县| 晋中市| 永城市| 宝应县| 萨迦县| 辽中县| 甘孜县| 昔阳县| 吉林省| 大足县| 汾阳市| 确山县| 竹北市| 怀远县| 新乡县| 简阳市| 德江县| 伊吾县| 汉阴县| 天津市| 界首市| 东方市| 开江县| 砚山县| 岳普湖县| 抚松县| 新民市| 申扎县|