Chapter 20: SOAP and WSDL


When you start working with the Web services space, you quickly realize that so much in this space resolves completely around SOAP and WSDL. SOAP, or Simple Object Access Protocol, is the language that Web services speak to transmit messages over the wire. WSDL, or Web Services Description Language, is the XML structure used to describe the SOAP messages involved in the request/response process.

This chapter investigates both of these technologies and how to use them to your advantage in the applications you are building today. It reviews the basics of SOAP and WSDL, as well as how you can go about extending both these technologies using various tools and technologies that are at your disposal in the industry today.

SOAP Speak

SOAP is an XML-based technology. It is an agreed-upon standard of XML markup used in the transmission of messages across a corporate network or the public Internet. SOAP is the most important pillar in the Web services model.

The proposed Web services model is presented in Figure 20-1 and involves a process of search, discovery, definition, and communication. The first three steps in this process are one-time steps, but these steps are required to get to where you really want to go-the communication step. This step is the step that deals with SOAP. Web service communication is done through the use of SOAP.

image from book
Figure 20-1

As you look over this diagram, notice that not every step mentioned is required to participate in the Web services world. Also, in certain instances, some of these steps can be combined into a single step. For example, the ‘Find a Service’ section and the ‘Discovery’ section can be one and same thing. The idea is that when you want to consume a Web service, you first need to find that service. This discovery process can be as simple as having someone e-mail you a link to the Web service's WSDL file, or it can be a more complicated operation that involves searching a directory of some kind (such as UDDI).

After you have found the service you want to consume, the act of discovery should bring you to the location of the Web service's WSDL file. The WSDL file is an XML description of the Web service's interface. After you have found the WSDL file of the Web service, you can create a proxy class (or your environment automatically creates one for you) that enables you to send messages back and forth to the Web service.

Although this chapter focuses on SOAP as the means of communication to be used between disparate objects, you have, of course, other options. For instance, XML-RPC, ebXML, and REST can be used in a similar manner to SOAP. They all provide structure to any remote-procedural call you need. You might not find all the pillars of these other RPC formats defined in Figure 20-1, but the concepts are the same.




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