crowso
crowso

Reputation: 2087

why soap web services

whats the real reason behind using soap to pass values between web-service and client application ? Why cant we use XML ? What advantages does soap give over XML?

Upvotes: 0

Views: 2141

Answers (2)

miku
miku

Reputation: 188154

Soap uses XML as its message format, you can look at the example below. The advantage over plain XML messages is, that you have a spec, which defines, how you construct calls to remote services (which was a revolution many years ago). Over the years, a competing approach, namely REST has gained more traction in this space, not least because the SOAP has some shortcomings.

POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:GetStockPrice xmlns:m="http://www.example.org/stock">
      <m:StockName>IBM</m:StockName>
    </m:GetStockPrice>
  </soap:Body>
</soap:Envelope>

Upvotes: 4

andbi
andbi

Reputation: 4454

SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It relies on Extensible Markup Language (XML) for its message format.

WIKI SOAP

Upvotes: 0

Related Questions