InterviewSolution
| 1. |
What is REST and SOAP? What is different between them? |
||||||||||||||||
|
Answer» REST (Representational State Transfer): It is a NEW and improved form of web service. It describes the architectural style of networked systems. It does not require greater bandwidth when requests are sent to the SERVER. It just includes JSON message. For example: {"city":"Mumbai","state":"Maharashtra"}SOAP (Simple Object Access Protocol): It is a simple and lightweight protocol that is generally used for exchanging structured and typed information on the Web. It works mostly with HTTP and RPC (Remote Procedure Call). This protocol is mainly used for B2B applications one can define a data contract with it. SOAP messages are heavier in content and THEREFORE use greater bandwidth. For example: <?xml version="1.0"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope" SOAP-ENV:encodingStyle=" http://www.w3.org/2001/12/soap-encoding"><soap:Body><Demo.guru99WebService xmlns="http://tempuri.org/"> <EmployeeID>int</EmployeeID> </Demo.guru99WebService> </soap:Body></SOAP-ENV:Envelope>
|
|||||||||||||||||