XML & Web services: Why SOAP, why not HTTP?
Servlet & JSP's are using HTTP protocol to send request and receive information.
- Posted by: sriram sundararajan
- Posted on: March 30 2010 12:20 EDT
Why can't use HTTP itself for web service too, why should i have to rely on SOAP?
Using web service i can transfer data from one app to other app running in two different technologies, say java app to .net app.
So why can't i use HTTP in web service, as i can send and receive information in java and .net using HTTP?
What is so speacial about SOAP, that we are using in webservice?
If encryption is the problem, i can very well use HTTPS right?
Here is what i read about SOAP, "SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages" Can't i achieve the same using HTTP?
- Why SOAP, why not HTTP? by Teja Kantamneni on March 30 2010 12:44 EDT
- Why SOAP, why not HTTP? by Dan Evans on April 08 2010 21:09 EDT
- REST by David Tkaczyk on July 06 2010 13:39 EDT
SOAP is a protocol specification for exchanging structured information for doing webservices. One implementation of SOAP uses HTTP, but SOAP can be used with other transportation protocols like JMS, SMTP. SOAP provides a standard for exchanging messages between applications in a structured fashion while HTTP is only for transportation.
Thanks for your reply.
But if SOAP is meant for transferring the messages, before SOAP how we transferred all the messages? Can't we use the same HTTP header get/post method to transfer all the messages? Servlet's and Jsp's are using the same logic now also, but i am not sure about how .net was sending and retrieving the data using HTTP i.e. before the introduction of SOAP.
I am asking this question to you, to make myself clear about the role performed by the SOAP and not challenging your answer :-)
I am not sure if I understood your new question properly or not. Before SOAP when two different applications talk to each other there are some proprietary protocols available like RMI/IIOP (Internet Inter-Orb Protocol) which obviously works well only with java (though there are ways you can work with other technologies using other interfaces). SOAP over HTTP brought a neutral platform independent way of communicating between two different applications/services with open standards using XML.
You can use either protocol. Web services can be implemented using http as well.
You should Google RESTful web services.