The Basics of SOAP


Presently SOAP is in version 1.2. You can find the full specification for SOAP 1.2 on the W3C site located at w3.org/TR/soap/.

As of the writing of this book, SOAP 1.2 has existed for only a short time, and much of the use of SOAP in the world still focuses around SOAP 1.1. For instance, in the .NET world, SOAP 1.1 is the basis of Web services for .NET 1.0 and 1.1. Only .NET 2.0 allows you to expose and consume Web services using SOAP 1.2; although SOAP 1.2 is not the default format provided in .NET 2.0.

SOAP 1.1 was developed in March 2000, and it was accepted as a note by the W3C on May 8, 2000. The companies that worked on the development of SOAP include Microsoft, DevelopMentor, IBM, Lotus, and UserLand Software.

SOAP 1.2 was accepted on June 24, 2003 after more than 400 issues from SOAP 1.1 were addressed. SOAP 1.1 required a set of clarifications to clean up ambiguities found in its specification. These ambiguities in SOAP 1.1 had sometimes led to differences in interpretations among the various vendors. When the specification engenders differences in interpretation, interoperability issues invariably arise. To prevent these varied interpretations, SOAP 1.2 is a lot more specific.

SOAP is not a proprietary technology; that is, it is not run or controlled by IBM or Microsoft. It is, instead, an open standard. Therefore, you can use SOAP as you wish for free. The software vendors of the world have come to support SOAP, and you will be hard pressed to find a vendor that isn't making some sort of inroads into getting its platform to understand and work with this XML-based technology.

Remember: SOAP Is XML!

The first thing to either make note of (or remember) is that SOAP is just an agreed-upon structure of XML. SOAP uses XML grammar for a number of reasons as detailed here:

  • q XML is an open standard.

  • q XML is consumable upon most platforms.

  • q A tremendous amount of industry support exists for XML.

  • q XML is also very human-friendly.

  • q A number of developer tools, applications, and parsers are available today for XML.

These points make it pretty easy to see why SOAP is constructed to be based upon this technology. Because of its use of XML and the general simplicity of SOAP, you should find that working with its remote procedure call method is a lot easier than working with other methods, such as CORBA or DCOM, which provide similar functionality.

Transport Protocols for SOAP

SOAP-based services exist to meet the business need to share data among departments, with customers, or with partners. In many instances, the data that is to be shared must travel from one database to another between completely incompatible systems. SOAP is the tool that allows companies to share information from one point to another without the need to concern themselves with the platforms of the consumers. Now that you have entered into the Web services world, the first question from your data consumers will not be, "What platform is the data on?" Instead the question will be, "Can you expose that data to me as SOAP?"

In most cases, the Web services that people build make use of HTTP. Most systems, applications, and platforms are connected to the outside world in order to gain access to the Internet. The Internet has become a powerful means of human-to-human communication, even as it becomes an ever stronger force for machine-to-machine communication. These machines communicate with one another through this Internet connection-also known as HTTP.

Putting SOAP on top of HTTP is powerful. SOAP allows you to send data that is a lot more complex and meaningful than the name/value pairs that you can send using HTTP-GET or HTTP-POST. Also, if you send complex data types from one machine to another using something other than HTTP, you have the problem of firewalls to contend with. Almost all machines or servers are behind a firewall of some kind. If you have a server that isn't behind a firewall, you are just asking for some malicious person to come in and mess with your machine and its contents. Firewalls, basically, block all entrances to the server. If the entrances are blocked, however, how can anyone use SOAP to communicate with a machine?

Communication is possible because one of the doors to this server is usually open. Port 80 on almost every server is used for access to the Internet. SOAP rides along (again, using HTTP) right through this open door to the server. Because SOAP is just a set of ASCII characters, it cannot harm the receiving server, so the information is let in without any problems.

More and more Web services are also starting to utilize Transmission Control Protocol (TCP) for message transmission as an alternative to HTTP. You should consider using TCP when performance and reliability are important factors to you.




Professional XML
Professional XML (Programmer to Programmer)
ISBN: 0471777773
EAN: 2147483647
Year: 2004
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net