DIS The first five lines, part of the HTTP header, indicate the type of message (a POST), the host, content type and length and the SOAPAction header, which gives the intent of the SOAP request. The SOAP message itself is an XML document, with the SOAP envelope first, then an XML element that specifies the SOAP name space and attributes, if any. The SOAP envelope may include a header (though not here), followed by a SOAP body. In this case, the body specifies the GetLastTradePrice request and the stock symbol for which the last trade price is requested. A response to this SOAP request might look like this: HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: nnnn xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 34.5 Again, the first three lines are part of the HTTP header; the SOAP message itself consists of an envelope that contains the response to the original request, labeled GetLastTradePriceResponse, and includes the value returned, in this case 34.5. " /> Simple Object Access Protocol | ITworld

Simple Object Access Protocol

By Pete Loshin, Computer World |  Networking

Summary: Simple Object Access Protocol (SOAP) is an XML-based protocol that defines a framework for passing messages between systems over the Internet. It's typically used for executing remote procedure calls. SOAP was originally intended and defined for use on top of HTTP to make SOAP more easily incorporated into Web-based applications, but other transport protocols, such as SMTP, can also be used.

Let's say that you're building an Internet application service; customers interact with it by submitting information. Your servers process the data and return results to the customers. What's the best way to get that data into and out of your systems?

You could build a custom client/server application and require your customers to use the client software to access your service. But if you're doing business over the Internet, you have to build the client to run on all possible client platforms -- Windows, Macintosh, Unix, Linux and more. That's a lot of clients to write.

How about using the Web? That works, but you're still tied to browser implementations, and you still have to build an infrastructure to send and receive input and output and to format and package that data for transmission. For a complicated application, you may opt for Java or ActiveX code, but then you start losing users to bandwidth and security issues.

What's needed is a simple protocol that makes it easy to package application data and send it back and forth across the Web, using the content-tagging language XML to ensure that both the sender and the recipient can easily interpret the contents of any messages. And using the Web protocol HTTP as the transport would eliminate the need for more firewall holes.

That pretty much describes Simple Object Access Protocol (SOAP) -- a simple "glue" protocol that lets nodes remotely invoke application objects and return results. SOAP provides a lowest common denominator for applications to transmit messages: A client can send a message to invoke some program object, and a server can return the results of that invocation.

SOAP is pretty simple: Messages are just XML documents that contain SOAP instructions. Though in theory, SOAP can be bound to any application transport protocol, it's commonly used with HTTP.

Kennard Scribner, co-author of Understanding SOAP: The Authoritative Solution (Macmillan USA, 2000), explains that SOAP works by converting method-invocation information such as argument data and transaction identifiers into an XML format.

The data is encapsulated into HTTP or some other transport protocol and sent to its destination, which is usually a server. That server extracts the SOAP data, does the requested processing and returns the results in a SOAP reply.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.

     

    Learn more

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question