What is the difference between XML and SOAP? I've been reading some introductory articles about SOAP but I am very confused. This is the first time I am reading about SOAP so maybe that's natural.
Could somebody please explain to me what SOAP is and what it is used for? Maybe give me some examples of its usage?
SOAP relies exclusively on XML to provide messaging services. Microsoft originally developed SOAP to take the place of older technologies that don't work well on the internet such as the Distributed Component Object Model (DCOM) and Common Object Request Broker Architecture (CORBA).
A SOAP message is encoded as an XML document, consisting of an <Envelope> element, which contains an optional <Header> element, and a mandatory <Body> element.
SOAP uses an XML data format to declare its request and response messages, relying on XML Schema and other technologies to enforce the structure of its payloads.
SOAP is an acronym for Simple Object Access Protocol. It is an XML-based messaging protocol for exchanging information among computers. SOAP is an application of the XML specification.
After reading all of the other good answers, I thought it might be helpful to provide a "super laymans" version. I hope it helps.
SOAP is like the computer version using the postal service. A message (like a letter) is placed in an envelope and sent off to the person it is intended for.
Primarily, SOAP is an XML vocabulary. It defines a language, using the XML specification, for how to address and send send messages.
Specifically, it standardizes what we refer to as:
In addition, SOAP defines a type-system
, much like the type definitions you find in .Net, Java or XSD. I won't elaborate on this - as there is plenty of documentation out there as mentioned in previous answers.
The primary design focus of this language/vocabulary was to allow interoperability across platforms. So, Java calling COM, calling .Net, calling J2EE and the rest while remaining extendable for the foreseeable future. Instead of building yet another bridge between a COM object and a Java class, we can simply use SOAP to expose the functionality of our object so that other platforms can use them without the need for bridges. Or, to put it differently - SOAP was one last bridge, designed to replace all of the previous bridges.
By now, all major development toolkits have some form of SOAP support. This has made interoperability more and more available - but in most environments, a certain level of configuration is still necessary in order to make communication truly seamless.
I should note also that SOAP no longer stands for what its original intent was. At some point, I think some important person will (re)name it: Service Oriented Access Protocol
.
I hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With