Books
in black and white
Main menu
Home About us Share a book
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Network services investment guide - Gaynor M.

Gaynor M. Network services investment guide - wiley publishing , 2003. - 322 p.
ISBN 0-471-21475-2
Download (direct link): networkservicesinvestment2003.pdf
Previous << 1 .. 91 92 93 94 95 96 < 97 > 98 99 100 101 102 103 .. 128 >> Next

<xsd:maxExdlusive value="1000"/>
</xsd:restriction>
</simpleType>
This looks complex because it is; however, the important information for this chapter (and for your understanding) is in bold. This data the soap service receives is composed of two elements: item_code and item_num. This first element is a string representing the unique code of the item to check for inventory. This string consists of a single alpha character (between A and Z), followed by a hyphen, and then five numbers. For
Web Applications and Services 231
example, B-49899 is a valid item code, but B9-999 is not. The second parameter is the number of items to check the inventory for. Its range is greater than zero and less than 1000. This example demonstrates the precise nature of how XML is used to describe data. In this case, the data is represented with no ambiguity; as long as you understand the rules of XML encoding, you can't interpret the data wrong.
The previous example of a schema is associated with an XML document that has data but no meta information about the type of data. Here is an example of how a piece of the XML request will look to the server when requesting inventory for 500 items of product D-23456:
<item_code="D-23456">
<Item_num="500">
This piece of code contains data that fits into the definition provided by the meta-data in the XML schema associated with this instance of its use. While the schema seems hard to read, its highly structured nature is easy for a computer to parse.
This very basic introduction to XML is enough to understand how soap services are put together, as well as why they have such potential to fundamentally change business processes by putting information in the hands of those who need it. Don't be fooled into thinking XML is simple it is not. Its flexibility to represent complex structured data creates complexity. Fortunately, this complexity is hidden from the users of soap services and not necessary to understand soap services at a business level.
SOAP Simple Object Access Protocol
SOAP is the protocol used to exchange XML documents over the Internet. It provides the definition of XML-based encoded data used for exchanging structured and typed information between peers in a decentralized, distributed environment [13]. Using XML, SOAP defines the messages passed back and forth between the soap service client and the server. SOAP is very flexible in how it defines the container for the XML data. This container is the SOAP envelope, which contains headers and a body. This SOAP message is not tied to any particular transport protocol and can be transported with HTTP, SMTP, or even FTP. SOAP is platform independent because any two operating systems with a SOAP stack can communicate via SOAP messages, allowing applications running on heterogeneous systems to speak the same language. SOAP is part of a distributed computing environment that is mostly invisible to the users. SOAP is the first such distributed
232 Chapter 12
messaging protocol accepted by most major vendors including Microsoft, IBM, and Sun.
SOAP provides support for many aspects of distributed computing. Some functions it performs are listed here:
Defines the unit of communication the SOAP envelope that contains all message headers and body
Allows handling of errors by the SOAP fault mechanism
Provides a scheme allowing extensibility, which implies that SOAP's evolution is not constrained
Allows several paradigms of communications: the RPC, direct document-centric, and indirect document-centric approaches to pass SOAP messages between users
Determines the protocol used to transport SOAP messages (HTTP, SMTP, or FTP)
A simplified version of the SOAP message asking my wife Gretchen to bring home some pasta for dinner tonight is shown here:
<?xml version="1.0"?>
<soap:Envelopxmlns:soap="http://schemas.xmlsoap.org/soap/envelop/">
<soap:Header>
<To>Gretchen</To>
<From>Mark</From>
</soap:Header>
<soap:Body>
Please pick up some pasta for dinner tonight </soap:Body>
</soap:Envelopxmlns>
This simple example illustrates the SOAP envelope with a header and message body. The header in this case is who the message is to and from. The body is the message asking my wife to bring home some pasta for dinner tonight.
Two SOAP Models RPC and Message
SOAP allows two styles of distributed computing architecture that use XML to exchange data between users: RPC and messaging architecture. RPC is most familiar to programmers because it fits within a model many have used. RPC uses SOAP and XML to marshal and unmarshal the parameters when calling a remote object or procedure. It is similar to DCOM
Web Applications and Services 233
and CORBA in its function. The messaging model is a far more flexible style of distributed computing because there are more options about how they exchange and process information. Both of these styles have their respective advantages and disadvantages; the particular application dictates which architecture makes the most sense.
Previous << 1 .. 91 92 93 94 95 96 < 97 > 98 99 100 101 102 103 .. 128 >> Next