I have to develop a site like paypal which supports online transaction where i need to implement web service. In short , I need to build some easy to use API using web service.But i am really confused which one to chose from REST or SOAP.
Java EE will be used to develop the web site. And our API will be mostly used for GET , UPDATE (PUT in http verb)
What i need :
- Error handling ability: A clear conception of ensuring the call has completed successfully or not . SOAP has it built in , but REST does not. It is a must have requirement for us.
- Simplicity: As our API will be used by various clients it needs to have a relatively small learning curve. In this case REST will be a good fit. A must have attribute
- Caching ability: Caching will surely be a plus as it saves a lot of resources. SOAP does not support caching. It is a good to have and high priority requirement.
- Human readable result: It may be necessary for debugging purpose . But not a must have attribute.
Now which way i should go for at least fulfill the must have and high priority requirements which are:
- Error handling abitliy
- Simpliciy
- Caching abitliy
I have googled a lot but failed to come into a decision . If anybody can give me a better suggestion other than these two , you are most welcome. I just need a solution which fulfill my requirement that's all.
Some resources i found while googling:
And my googling keywors were : SOAP vs REST , web service suitable for online transaction .
IMO, use
REST
.protocol
should define it.