Home > Articles > Web Services > XML

  • Print
  • + Share This
From the author of

Amazon Web Services: REST Versus SOAP

AWS comes in two web service delivery flavors:

  • SOAP (which originally stood for Simple Object Access Protocol) is a protocol that involves XML data exchange between client and server.
  • Representational State Transfer (REST) is a newer, simpler approach to web services. REST assumes HTTP as the underlying transport and most commonly returns only XML to the client.

Let’s begin with REST, because it’s the simpler of the two protocols to understand.

To communicate with AWS by using REST, issue a simple URL query. A URL query looks like a typical URL request, except that it uses a question mark (?) to separate the URL from the query portion and an ampersand (&) to delimit parameters. For example, to send data (let’s say name=bob and age=25) to the server http://www.foobar.com, you would use the following URL:


Since the server expects a URL query, it’s possible to invoke AWS directly from a web browser, which is great for experimentation and testing. AWS returns XML with elements describing result details.

To illustrate that point, let’s find out what Amazon.com knows about some specific book. All we need is the ISBN, and Amazon.com will tell us everything it knows about the book, including name, title, price, and more. To test the service, enter the following query as a single string, replacing xxxxxxxxxx with your personal Amazon.com key:


What you get in return is an XML document complete with element names that describe what Amazon.com knows about this book. Listing 1 shows only part of the output that was returned from my query.

Listing 1 Partial XML output from the Amazon.com book search web service.

<ProductName>XML, Web Services, and the Data Revolution (Addison-Wesley Information Technology Series)
<Author>Frank P. Coyle</Author>

<ReleaseDate>05 March, 2002</ReleaseDate>

<Manufacturer>Addison-Wesley Professional</Manufacturer>


<Availability>Usually ships in 24 hours</Availability>

Looking at the ease with which the service can be accessed, it’s easy to see why REST has been generating a lot of excitement in the web services world. Its selling point is that it’s simple for both humans and computers.

Now that we’ve entered a REST query manually, let’s look at how to do it programmatically.

  • + Share This
  • 🔖 Save To Your Account