SOAP Version 0 |
|
š¤ Author: by kaamssabrygmailcom 2018-10-29 10:03:52 |
Simple ob_ject Access Protocol (SOAP)
SOAP is a standards-ba_sed Web services access protocol that has been around for a while and enjoys all of the benefits of long-term use. Originally developed by Microsoft, SOAP really isnāt as simple as the acronym would suggest.
REST is the newcomer to the block. It seeks to fix the problems with SOAP and provide a truly simple method of accessing Web services. However, sometimes SOAP is actually easier to use; sometimes REST has problems of its own. Both techniques have issues to consider when deciding which protocol to use.
Before I go any further, itās important to clarify that while both SOAP and REST share similarities over the HTTP protocol, SOAP is a more rigid set of messaging patterns than REST. The rules in SOAP are important because without these rules, you canāt achieve any level of standardization. REST as an architecture st_yle does not require processing and is naturally more flexible. Both SOAP and REST rely on well-established rules that everyone has agreed to abide by in the interest of exchanging information.
A Quick Overview of SOAP
SOAP relies exclusively on xm_l 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 ob_ject Model (DCOM) and Common ob_ject Request Broker Architecture (CORBA). These technologies fail because they rely on binary messaging; the xm_l messaging that SOAP employs works better over the Internet.
After an initial release, Microsoft submitted SOAP to the Internet Engineering Task Force (IETF) where it was standardized. SOAP is designed to support expansion, so it has all sorts of other acronyms and abbreviations associated with it, such as WS-Addressing, WS-Policy, WS-Security, WS-Federation, WS-ReliableMessaging, WS-Coordination, WS-AtomicTransaction, and WS-RemotePortlets. In fact, you can find a whole laundry list of these standards onĀ Web Services Standards.
The point is that SOAP is highly extensible, but you only use the pieces you need for a particular task. For example, when using a public Web service thatās freely available to everyone, you really donāt have much need for WS-Security.
The xm_l used to make requests and receive responses in SOAP can become extremely complex. In some programming languages, you need to build those requests manually, which becomes problematic because SOAP is intolerant of errors. However, other languages can use shortcuts that SOAP provides; that can help you reduce the effort required to create the request and to parse the response. In fact, when working with .NET languages, you never even see the xm_l.
Part of the magic is the Web Services Desc_ription Language (WSDL). This is another file thatās associated with SOAP. It provides a definition of how the Web service works, so that when you create a reference to it, the IDE can completely automate the process. So, the difficulty of using SOAP depends to a large degree on the language you use.
One of the most important SOAP features is built-in error handling. If thereās a problem with your request, the response contains error information that you can use to fix the problem. Given that you might not own the Web service, this particular feature is extremely important; otherwise you would be left guessing as to why things didnāt work. The error reporting even provides standardized codes so that itās possible to automate some error handling tasks in your code.
An interesting SOAP feature is that you donāt necessarilyĀ haveĀ to use it with the HyperText Transfer Protocol (HTTP) transport. Thereās an actual specification forĀ using SOAP over Simple Mail Transfer ProtocolĀ (SMTP) and there isnāt any reason you canāt use it over other transports. In fact, developers in some languages, such as Python and PHP, areĀ doing just that.