Conclusion


Download CD Content

SOAP originally stood for the “Simple Object Access Protocol,” but with the latest revision, SOAP is no longer an acronym. This reflects the dynamic nature of the SOAP standards and Web Services, especially as various implementations start to mature.

The SOAP standard dictates how the XML looks within the SOAP document, how the contents of that message are transmitted, and how that message is handled at both the sender and receiver. SOAP also provides a standard set of vocabulary. This chapter introduces that vocabulary, shows different applications of that vocabulary, and shows what the XML in a SOAP document looks like.

Vocabulary

As with any technology, SOAP comes with its own set of vocabulary. There are several terms used frequently to describe different aspects of the SOAP standard. You’ll find that many developers use these terms without truly understanding their meaning. So it’s important to take the time to understand what each term means and how it applies to both the SOAP standard and to an actual Web Service.

Note

The SOAP standard is not just an XML standard. The standard includes how SOAP messages should behave, the different transports used, how errors get handled, and more.

The terminology related to SOAP comes in two different categories: transmission and message. The terms related to transmission deal with describing how SOAP messages relate to the protocol, how the different SOAP nodes converse, and so on. On the other hand, terms related to the XML within SOAP fall into the message category.

Transmission

In the next set of terms, the focus is strictly on describing the transmission of SOAP messages between the various senders and receivers. The “SOAP Connection Model” section of this chapter actually demonstrates the terms defined here with graphics.

SOAP

This used to stand for “Simple Object Access Protocol” but with the latest revision of the standard, Version 1.2, SOAP is no longer an acronym. The SOAP standard contains the information for how the messages should be sent, the format the XML appears in, the different primitive types supposed, the roles different pieces of software take during the transmission of the SOAP documents, and the type of transports available, such as HTTP.

As this standard moves forward, the name will change to XMLP for the XML Protocol. SOAP’s evolution has been muddied by the fact that it came from Microsoft. XMLP is a complete rewrite of the standard so that Web Services become even more cross-platform compatible. Because of this change, much of this vocabulary must evolve. Although the names will probably change, the general idea of each term will remain the same.

SOAP Binding

This describes how a SOAP message works with a transport protocol such as HTTP, SMTP, or FTP to move across the Internet. It is important that SOAP moves across a standard protocol in order to communicate with other Web Service products.

Before SOAP, many developers created their own method of transmitting XML documents through a network. This works fine as long as the transmission is limited within a particular team. If, however, you need to work with another group either within or outside your company this becomes difficult because of training and possible modification to work with an XML transmission they may be using. By using a standard XML document on standard protocols, the work needed for collaboration will be minimal.

SOAP Message Exchange Pattern (MEP)

This describes how a SOAP document gets exchanged between a client and server. The SOAP message possesses a binding, such as HTTP, so that it can move across the Internet. The conversation between the client and server, both known as nodes, determines what actions both take. See the next section for some simple diagrams that help show how this works.

Remember that SOAP is an XML encapsulation of RPC. Therefore, the MEP is completely request and response between the client and server (or other nodes). Thus, if there needs to be several interactions between nodes, this takes several requests and responses to complete transmission. This differs from other remote object technologies such as CORBA where the entire conversation occurs over one single connection.

SOAP Application

A SOAP application is simply an application that uses SOAP in some way. Some applications maybe entirely based on the SOAP standard, such as the stock Web Services example shown later in the chapter, or may just use the SOAP standard to receive code or software updates. Remember an application can produce, consume, or be an intermediary (or router).

SOAP Node

A node’s responsibility can include sending, receiving, processing, or retransmitting a SOAP message. A node is just a piece of software that properly handles a SOAP document dependent on its role. Besides transmission, a node is also responsible for enforcing that the XML contained in the SOAP document is grammatically correct according to the SOAP standard.

SOAP Role

A SOAP role defines what a particular node does. It may be a sender, receiver, or intermediary.

SOAP Sender

The node sending the SOAP request is the SOAP sender. If you think of a client/server example, when a client first makes a request, it sends a message to the server asking for some information. In the upcoming Stock Quote Example, the client sends a request to the Stock Quote Server. In this case, the client acts as the SOAP sender by transmitting a message asking for a quote.

SOAP Receiver

A server that receives the SOAP request is obviously the receiver. This is the server in the client/server model. The Stock Quote Example later on in the chapter has a server that receives the request for stock quotes and then returns the appropriate values.

SOAP Intermediary

An intermediary looks at a SOAP message, perhaps acts on some of the information in the message, and then looks at the SOAP document for more information on where to pass the information in the document next.

A SOAP intermediary essentially acts like a router in a network. A router takes a look at a packet of information moving through a network, finds the packet’s next destination, and then sends it to that destination.

A SOAP intermediary does the same thing but it’s looking at SOAP messages and information in the XML to send the message to the proper location. This occurs when a large corporation possesses many SOAP servers that perform different functions, and the SOAP intermediary may have access to the firewall. Once it receives the information, it looks at the XML to see where to send the message next. It may act on or modify the data before this retransmission, but it is not necessary.

Message Path

A SOAP message moves from sender to receiver perhaps through several intermediaries. The resulting route the message takes is the Message Path.

Initial SOAP Sender

The node sending the first SOAP request is the initial SOAP sender.

SOAP Feature

A SOAP feature is a piece of functionality in software supporting SOAP that deals with a feature of SOAP. Examples include securing the transaction with a secure protocol or the software acting as an intermediary.

Terms Related to the XML

The SOAP standard also defines a small set of XML elements to encapsulate the data transmitted between nodes. There are really only a few elements because the body of the message can vary depending on the implementation. This flexibility is allowed by the standard.

SOAP Message

This is the XML document transmitted by either a SOAP sender or receiver. A sender or client creates an XML document containing the information the client needs from the server. Once that document is transmitted, the server parses the information in the document to access the various values and then creates a new SOAP message as the response.

SOAP Envelope

This is the root element of the SOAP XML document. The SOAP document contains several namespace definitions but the elements related to the SOAP message will have ENV: as the prefix. Examples later in the chapter describe the XML in greater detail.

SOAP Header

The first part of a SOAP message contains a header block in XML that is for the routing and processing of the SOAP message. This data is separate from the body of the document which has information related to the object call being made.

SOAP Header Block

A SOAP header containing several delimited sections or blocks of information has a header block. These header blocks come with processes that include SOAP intermediaries because a node needs to know where to send the message to next.

SOAP Body

The body of the message actually contains the information for the object to process the information. The body is still in XML and, once parsed, the information goes to the object. The object processes the information and the result is put into the SOAP body of the returned document.

SOAP Fault

This is simply a piece of information in the XML of a SOAP document containing information related to any error that may have occurred at one of the SOAP nodes.

Quick Reference

As you move forward in this book, you may find it useful to refer back to this chapter to look up the definition of a term you may have forgetten. The following tables help by giving you a quick reference to each one of the terms. Table 3.1 provides a summary of all connection-related terms. Table 3.2 summarizes SOAP-related terms.

Table 3.1: Provides a Quick Summary of All the Connection-Related Terms

Connection Term

Description

SOAP

The standard defining how the XML document looks and how the information moves across the Internet.

SOAP Binding

Describes how SOAP interacts with a standard transport protocol such as HTTP or SMTP.

SOAP message Exchange Pattern (MEP)

This is the conversation a client and server has while exchanging information.

SOAP Application

An application that consumes or creates SOAP messages.

SOAP Node

A server that somehow interacts with the SOAP message Exchange Pattern.

SOAP Role

A SOAP node may have one of three roles or jobs: sender, receiver, and intermediary.

SOAP Sender

A SOAP sender is the node sending a request to another node.

SOAP Receiver

A SOAP receiver is the final processor or destination of the request.

SOAP Intermediary

Acts as a router or relay by passing the SOAP message onto the next node. Relies on information in the message to find the next node.

Message Path

The path or route the SOAP message follows during processing.

Initial SOAP Sender

The node that originated the SOAP request.

SOAP Feature

Relates to pieces of the SOAP standard such as security or errors.

Table 3.2: A Summary of All the Terms Related to the SOAP message

SOAP message Term

Description

SOAP message

The XML document transmitted between SOAP nodes.

SOAP Envelope

The root element of the SOAP XML document.

SOAP Header

The top portion of the SOAP XML document that contains information relevant to the processing of the message.

SOAP Header Block

If a header contains a lot of information, several section or blocks occur in the header to separate the information.

SOAP Body

The part of the SOAP XML document right below the header that contains information for the actual object call.

SOAP Fault

Information in the SOAP document relevant to any error that occurred.




Cross-Platform Web Services Using C# and Java
Cross-Platform Web Services Using C# & JAVA (Charles River Media Internet & Web Design)
ISBN: 1584502622
EAN: 2147483647
Year: 2005
Pages: 128

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