Search /
Docfinder:
Advanced search  |  Help  |  Site map
RESEARCH CENTERS
SITE RESOURCES
Click for Layer 8! No, really, click NOW!
Networking for Small Business
TODAY'S NEWS
iPhone 5 rumors for the week ending May 18
Cisco's wireless unit shifts emphasis to "mobility"
Comcast ditches flat 250GB bandwidth cap for tiered service approach
Open-source messaging at (nearly) the speed of light
Social media a boon for businesses, but creates security quagmire
Academics propose groundbreaking uses for Watson
With Verizon pushing more into data caps, Sprint touts unlimited option
J*******k: Dirty word disappears from Apple iTunes store
Survey: BYOD sparks enterprise investment in Unified Communication and Collaboration
Privacy advocates fear CISPA
Doctors warned not to use social media with patients
Cisco mobility bundles target BYOD, mobile virtual desktop
iPhone 5 said, again, to have 4-inch display
Ethernet switching gets specialized
'Thelma & Louise,' 'Beetlejuice' star Geena Davis wins major telecom award
/

Foaming SOAP

Gearhead archive

"SOAP Version 1.2 provides the definition of an XML document which can be used for exchanging structured and typed information between peers in a decentralized, distributed environment. It is fundamentally a stateless, one-way message exchange paradigm, but applications can create more complex interaction patterns, [such as], request/response, request/multiple responses, [and others], by combining such one-way exchanges with features provided by an underlying transport protocol and/or application-specific information. . . . Also, SOAP provides a full description of the expected actions taken by a SOAP processor on receiving a SOAP message."
- W3C SOAP Version 1.2 Part 0: Primer, W3C Working Draft 17, December 2001.

So, last week on the way to explaining what Simple Object Access Protocol (SOAP) is, we beat the topic of remote procedure calls into shape because RPCs are essentially what SOAP is all about - invoking a remote process and passing its parameters and optionally receiving a response with optional data.

The key to the communication between the remote process and its client is XML. Under SOAP, an XML-formatted message is used for both endpoints - that is, client and server.

A SOAP method (the process it is being called) is uniquely identified by a namespace universal resource indicator (URI) and an NCName. The NCName maps to the symbolic name of the process being called - otherwise called the method.

SOAP method requests are HTTP post requests that have a SOAPMethodName HTTP header:

POST /objectURI HTTP/1.1
Host: www.vitallyimportantinformation.com
SOAPMethodName: urn:vii:buffet#getNumStories
Content-Type: text/xml
Content-Length: nnnn

This HTTP header indicates that the getNumStories method under the urn: vii:buffet namespace should be invoked. You can place any valid XML inside the SOAP:Body tag.

The other part of the SOAP request, the HTTP message body, is an XML document. This document contains the information needed to invoke the request.

Let's say that what we're doing is getting news items from a server named www.vitallyimportantinformation.com and what is required is the date of the news. The request would look like this:

<?xml version='1.0'?>
<SOAP:Envelope
xmlns:SOAP='urn:schemas-xmlsoap-org:soap.v1'>
<SOAP:Body>
<i:getStories
xmlns:i='urn: vii:buffet#getNumStories'>
<date>032502</date>
</i:getNumStories>
</SOAP:Body>
</SOAP:Envelope>

The architecture of the request consists of SOAP:Envelope, under which is SOAP:Body. All that is needed to invoke the getNumStories method is a date, so in this example there is only one child element below the i:getNumStories element.

After the server handles the SOAP request, the response might look something like this:

200 OK
Content-Type: text/xml
Content-Length: nnnn
<?xml version='1.0'?>
<SOAP:Envelope
xmlns:SOAP='urn:schemas-xmlsoap-org:soap.v1'>
<SOAP:Body>
<i:getNumStories
xmlns:i='urn: vii:buffet#getNumStories'>
<count>3</count>
</i:getNumStories>
</SOAP:Body>
</SOAP:Envelope>

It really is that simple. Well, OK, it's not actually simple, but unless you're going to become a programmer, that is a sound outline of the SOAP mechanism. If you want more, check out "Inside SOAP" by Don Box.

RELATED LINKS

Comments and suggestions to gh@gibbs.com.

Gibbs Forum
The place to discuss Gibbs's columns.

Check out this week's edition of

Backspin for more musings from Gibbs.

RELATED LINKS

Web services research page
Information and background on emerging standards such as XML, SOAP, WSDL, UDDI and more.

Web Applications newsletter
Stay current on new products and features, and learn how to get the most out of your apps.

Web services quandary
Tomorrow's business-to-business e-comm requires navigating the maze of conflicting Web services standards.
Network World Electronic Commerce Issue, 02/18/02.

Assembling a top-of-the-line Web services model
Ford Credit wins Network World's 2002 E-comm Innovator Award with an open-standards infrastructure that saves the company carloads of money.
Network World Electronic Commerce Issue, 02/18/02.


NWFusion offers more than 40 FREE technology-specific email newsletters in key network technology areas such as NSM, VPNs, Convergence, Security and more.
Click here to sign up!
New Event - WANs: Optimizing Your Network Now.
Hear from the experts about the innovations that are already starting to shake up the WAN world. Free Network World Technology Tour and Expo in Dallas, San Francisco, Washington DC, and New York.
Attend FREE
Your FREE Network World subscription will also include breaking news and information on wireless, storage, infrastructure, carriers and SPs, enterprise applications, videoconferencing, plus product reviews, technology insiders, management surveys and technology updates - GET IT NOW.