tags:

views:

159

answers:

4

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?

Thank you in advance.

+2  A: 

Wikipedia has a wonderful article, including a good example.

SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks.

A really good practical example:

As a layman's example of how SOAP procedures can be used, a SOAP message could be sent to a web-service-enabled web site (for example, a house price database) with the parameters needed for a search. The site would then return an XML-formatted document with the resulting data (prices, location, features, etc). Because the data is returned in a standardized machine-parseable format, it could then be integrated directly into a third-party site.

Derek Adair
+1  A: 

I would actually recommend looking at the SOAP Tutorial at W3Schools. It's a great introduction to SOAP and provides some nice examples.

Ascalonian
+1  A: 

SOAP is a messaging protocol used over networks to invoke web-services.
The message formats use XML, and are described by WSDL's - pronounced wizdil.

WSDL's are also XML documents.

XML is a document format that uses tags to identify the contents of the file, its usage is wider than SOAP and WSDL which are specific types of XML.
See the w3schools tutorial for XML at http://www.w3schools.com/xml/default.asp

crowne
A: 

After reading all good answer, i still couldn´t resist adding my ´super laymans´ version. Forgive me.


SOAP is like the computer version of where we humans use the postal services ´enveloppes and letters to our lovers`. (Mhh, is this analog still valid in todays world? Oh, well.. UPS still exists, so i guess so)

A large part of what SOAP is, is an XML vocabulary. i.e. defines a vocabulary, using the XML specification, to describe how to express ´how to send messages´.

It standarizes what we call

  • "an enveloppe" (Actually called enveloppe)
  • "the letter" (called 'the body')
  • and the "Annotations for the post services like stamps, signature request, sender information and the likes" (called 'headers')

It also contains a ´type-system´. Just like your type systems of .Net, Java or XSD. I won´t eleborate on this. Plenty of documentation out there as mentioned in previous answers.

The primary design focus of this language/vocabulary was to allow interoperability accross platforms. So, Java calling COM, calling .Net, calling J2EE and the rest while remaining extendable for the foreseeable future. So, instead of building ´yet another bridge between a COM object and a Java class´ we would be using SOAP to expose our functionality of our object so other platforms could call them without the need for bridges. Or, to put it differently, SOAP was the last bridge that we would ever build too.

By now, all major development toolkits have some, if not all, form of SOAP support. Interoperability became easier to implement than before, but remains ´a cream´ to get right.

SOAP no longer stands for what it original intend was; I´m still waiting for some important person to (re)name it: ´Service Oriented Access Protocol´.

I hope this helps,

Marvin Smit
Great explanation... although I'm not sure exactly what `super-laymen's` means. But if by that you mean not at all in `laymen's terms` it's an apt title ;)
Derek Adair