SOAP
SOAP - Simple Object Access Protocol.
Standard messaging protocol.
Mature, comprehensive, and XML based.
It is used heavily in financial services and payment gateways, where security and reliability are key.
Not so good for a lightweight mobile app or a quick prototype. SOAP might be overkill due to its complexity and verbosity.
The link given below will help you to understand how SOAP API works.
Example SOAP Request
POST /WebService.asmx HTTP/1.1
Host: www.example.com
Content-Type: text/xml; charset=utf-8
Content-Length: nnnn
SOAPAction: "http://www.example.com/SomeWebService/SomeWebMethod"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SomeWebMethod xmlns="http://www.example.com/SomeWebService">
<Parameter1>Value1</Parameter1>
<Parameter2>Value2</Parameter2>
</SomeWebMethod>
</soap:Body>
</soap:Envelope>
SOAP Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: nnnn
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SomeWebMethodResponse xmlns="http://www.example.com/SomeWebService">
<SomeWebMethodResult>ResultValue</SomeWebMethodResult>
</SomeWebMethodResponse>
</soap:Body>
</soap:Envelope>
Last updated