What is SOAP?
Benefits:
Application Development
- Provides a messaging platform regardless of the computer language, host platform or operating system.
- XML-based messages are human-readable for debugging and testing.
- Extensions can be added in a standard way that can maintain compatibility with various clients.
- Toolkits and new languages are available to easily and inexpensively create and deploy Web services.
Application Maintenance
- Major changes to back-end architecture can be made without impacting client applications.
- New messaging technologies can be supported while maintaining backward compatibility with existing messaging structures.
- Modules can be re-used for future applications.
- SOAP is based on standard, open technologies, helping to prevent obsolescence.
- Additional technologies (such as UDDI and WSDL) can be used in conjunction with SOAP to provide a greater level of automation and flexibility in application design.
How SOAP works:
SOAP was designed as a common XML-based protocol for transferring data over the Internet. It takes on some of the functions of traditional distributed frameworks, but can also serve as a simple wrapper to bring other types of data, making it useable for applications not involving remote procedure calls.
SOAP relies heavily on XML Namespaces. A SOAP message is contained in an Envelope element which contains the entire message. An Envelope can have an optional Header section that can be used to extend SOAP in whatever manner required by the applications. Some extension may be very specific to certain implementations, while others may be based upon future standards that would work across a variety of toolkits.
The Body element contains the actual SOAP message. Any data can be placed in any XML-compliant syntax. Note that the Body could contain other elements (as is done when using SOAP for RPC), or strings of text (which could use Base-64 encoding to encode binary data or, as in the example, XML elements).
SOAP also defines fault messages which can be used to pass errors. By adopting a standard for such errors, applications can have some level of communication even if the SOAP request is incorrect.
SOAP also defines fault messages which can be used to pass errors. By adopting a standard for such errors, applications can have some level of communication even if the SOAP request is incorrect.
SOAP is one part of an overall technology known as Web services, which are used for creating program modules that communicate via the Web (SOAP is one popular mechanism for doing this). Web services include technologies like WSDL (which is an XML syntax for describing a Web service) and UDDI, a standard for storing information about companies and the services they provide.