SOAP(Simple Object Access Protocol) and ReST(Representational State Transfer) are not the types of Web Service rather than they are the set of rules(protocol) used while sending and receiving data in heterogeneous environment.
These are the messaging types which are sent and received via services.
The major difference between the two's are:
1. SOAP is XML based where the data must be converted to XML while sending or receiving as it support only XML type of data. So when a .Net Service is sending the data using SOAP to another application, the data must be converted to XML and then send over the network. As the XML type can be understand by any other technology so it is good to use this type when sending the data over the network. Once the data reached to other end, it has to be again converted to the type which the other language understand from XML. Like if the other application is in Java then the XML will be converted to Java object and then the Java Application can use it.
2. ReST is the style where the data is sent/received using JSON representation which is the text format and all the browsers can understand it without converting to other type.
That is the reason, ReST is faster than SOAP.
3. Apart from this, there are few advantages and disadvantages for each of these types. SOAP can be implemented with security while ReST is not.
4. Using SOAP, the state can be defined for each requests while ReST is total stateless. Each request is new in case of ReST.
Hope it will be helpful to you.
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)