SOAP

From DataFlex Wiki
Revision as of 15:57, 22 November 2007 by Mikepeat (talk | contribs) (Adding)
Jump to navigationJump to search

SOAP is a XML-based protocol for exchanging data over a network. It used to stand for Simple Object Access Protocol, but since it was not all that simple and not in any meaningful way object oriented it has been, by consensus, retrospectively stripped of its acronym status. It is often proposed that it should now stand for Service Oriented Architecture Protocol, however this is only a little better, as Service Oriented Architectures require many other protocols than SOAP, and indeed can be built entirely without it.

SOAP is the basis of Web Services within Visual DataFlex.

A SOAP message is composed of an outer element, the Envelope, which then contains an optional Header element and a required Body element. Many simple SOAP services make no use of the Header element, but it is required for most of the more advanced web service protocols.

An example of a SOAP message might be (from [1]):

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Header>
  <n:alertcontrol xmlns:n="http://example.org/alertcontrol">
   <n:priority>1</n:priority>
   <n:expires>2001-06-22T14:00:00-05:00</n:expires>
  </n:alertcontrol>
 </env:Header>
 <env:Body>
  <m:alert xmlns:m="http://example.org/alert">
   <m:msg>Pick up Mary at school at 2pm</m:msg>
  </m:alert>
 </env:Body>
</env:Envelope>