From yesterdays i have started learning java web services, have seen many blogs still confuse, about which service is best for practice. either SOAP or Rest
?
Please suggest me best service method for request and response.
Thank You.
From yesterdays i have started learning java web services, have seen many blogs still confuse, about which service is best for practice. either SOAP or Rest
?
Please suggest me best service method for request and response.
Thank You.
There is no best, only choices. Choose the one that meets your needs and get on with it. Or simply pick one if you don't know what meets your needs.
REST is a style based on HTTP. It requires a level of knowledge that you probably don't have. I'd recommend starting with SOAP because it's so well supported with tools. Once you're comfortable, learn REST.
I think this article could help you: When to use rest or soap.
Personally I always use SOAP because it uses XML to transport the information, and it is easy to understand the structure of the data you are using in the comunication. Rest hasn't exactly a format to read, so it makes the things more complex to understand.
If you are just starting to learn about Web services I think you should go with SOAP.
Well, REST is more used than SOAP (something like 70% of the webservices, but I can't figure out where those figures come from). So if you want to be a professional developer, it may be more interesting to learn REST.
This question has been asked multiple times on SO over the years. You can find answers at Main differences between SOAP and RESTful web services in java and WSDL vs REST Pros and Cons and Restful vs Other Web Services
Both methods are used by many of the large players. It's a matter of preference. My preference is REST because it's simpler to use and understand.
SOAP:
Representational state transfer (REST):
There are endless debates on REST vs SOAP on google.