Pictures are for entertainment; messages should be delivered by Western Union.
”Samuel Goldwyn
SOAP is currently a fundamental, prerequisite building block for XML Web services. SOAP is used to send input to and receive output from conventional XML Web services. Thus, it is the underlying communications mechanism for today s Web services. Since a Web service requires input parameters in order to be activated, SOAP is also
The role and scope of SOAP, however, are not limited to Web services. SOAP is the latest in a long line of distributed computing initiatives, which in this context include CORBA and Microsoft s COM/DCOM, though it is not
SOAP is totally XML-centric. SOAP is a messaging scheme that works by exchanging XML documents. It is
XML, as should now be abundantly clear, is a mechanism for describing the meaning and context of data ”albeit based on both sides (i.e., creator and
Let s take a look at an obvious supply chain management (SCM) scenario, that of a supplier wishing to notify some of its customer base programmatically, with new pricing data, to appreciate the rationale for SOAP in the context of XML. With today s expertise in XML and the ready availability of the appropriate
Obviously, sending the XML document over HTTP as an e-mail attachment or sending it via FTP to each of the recipients is not adequate. This does not address the fundamental, program-to-program criteria ”nor does it offer XML-oriented, application-level transaction coordination, payload security, or
With SOAP one can conduct XML-based, program-to-program, request/response-oriented, RPC-like transactions that can be visualized in the form:
placeOrder()
getCreditRating()
findCurrentWeather()
getStockPrice()
updatePurchaseOrder()
obtainShipDate()
One can now see the relationship between XML documents, SOAP, and Web services because each of the procedure calls shown above could be to a Web service that
What SOAP really does when it comes to RPCs is provide a generalized mechanism for representing and encapsulating them within SOAP messages. The SOAP approach is programming language and protocol
Let s take, for example, the findCurrentWeather Web service, which when given a zip code returns an XML document that contains the current temperature, anticipated temperature range, current disposition (e.g., cloudy), and so forth. A SOAP-based call to this service, which is hypothetically assumed to be available as a method at www.your-weather.com, would look like:
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
<w:findCurrentWeather xmlns:w=http://www.your- weather.com/> <w:sZipCode xsi:type=xsd:string>03249</w:sZipCode> </w: findCurrentWeather>
The response to this call will be returned in another SOAP message. At this juncture it is best to actually look at the overall structure of a representative but relatively simple, SOAP-based transaction. To this end let s consider a hypothetical online book ordering scenario between a book retailer and a publisher realized via an eOrder SOAP request.
The SOAP request sent from the book retailer to the publisher will contain retailer identification, PO details, and information about the book. To achieve this, the customer sends the following orderItem SOAP request to the supplier, which includes pertinent information such as the customer identification (i.e., RetailID), the item number, item
POST /Orders HTTP/1.1
Host: www.megapublisher.com
Content-Type: application/soap+xml; charset="utf-8"
Content-Length: nnnn
<?xml version='1.0' ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/
soap-envelope">
<soap:Header>
<o:eOrder
xmlns:o=http://www.megapublisher.com/orders
soap:encodingStyle=http://megapublisher.com/
encoding
soap:mustUnderstand="true">
</o:eOrder>
</soap:Header>
<soap:Body>
<m:onlineOrder>
soap:encodingStyle=http://www.w3.org/2003/05/soap-
encoding
xmlns:m="http:// www.megapublisher.com/orders/">
<m:eOrder xmlns:m="http:// www.megapublisher.com/
orders">
<m:retailerCode>UK0216987</m:code>
<m:retailerName>TechBooks</m:retailerName>
<m:invoiceNumber>MgTec533</m:invoiceNumber>
<m:isbnNumber>1-55558-280-X</m:isbnNumber>
<m:author>Guruge</m:author>
<m:title>Corporate Portals</m:title>
<m:quantity>100</m:quantity>
<m:shipping>standard</m:shipping>
</m:onlineOrder>
</soap:Body>
</soap:Envelope>
This SOAP request, delivered to the book publisher (i.e., MegaPublisher.com) via HTTP, will result in the eOrder method to be invoked at www.megapublisher.com/orders/. SOAP itself does not specify or care how this method was implemented. It also does not get involved in how this request is
Even a cursory examination of this SOAP example will
In addition, the
This explains the significance of XML namespaces vis--vis SOAP. Since SOAP is a messaging scheme, the underlying
This preamble as to what SOAP is about can be concluded with the following summary of the salient SOAP attributes.
SOAP is an XML-based messaging scheme.
SOAP works between applications.
SOAP can be readily used between disparate platforms.
SOAP supports the encapsulation and remote delivery of RPCs.
SOAP is programming language agnostic.
SOAP enables XML to be communicated over HTTP.
SOAP, however, is not restricted to HTTP.
SOAP relies heavily on XML namespaces.
SOAP is used by Web services for their I/O operations.
SOAP is also considered to be what remotely invokes Web services.