Skip to Main Content
Amazon Hacks
book

Amazon Hacks

by Paul Bausch
August 2003
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Amazon Hacks

SOAP Web Services

Working with SOAP is quite a bit different from working with XML/HTTP because it involves sending and receiving structured messages. Instead of creating requests yourself as a URL, requests are made via XML messages. Here’s a typical SOAP request to retrieve a book’s details with its ASIN:

<?xml version="1.0" encoding="UTF-8" ?> 
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" [RETURN]
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <namesp1:AsinSearchRequest xmlns:namesp1="urn:PI/DevCentral/SoapService">
    <AsinSearchRequest xsi:type="m:AsinRequest">
      <asin>0596004478</asin> 
      <page>1</page> 
      <mode>books</mode> 
      <tag>insert associate tag</tag> 
      <type>lite</type> 
      <dev-tag>insert developer token</dev-tag> 
      <format>xml</format> 
      <version>1.0</version> 
    </AsinSearchRequest>
  </namesp1:AsinSearchRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

You’ll notice that although SOAP uses the same bits of information you use when requesting data via the URL-based XML/HTTP method, it wraps the request in substantial structure. Generating these XML requests “by hand” each time you need one would be time consuming; instead, there are packages (typically called SOAP toolkits) in every programming language that do the heavy lifting for you. These toolkits provide a simple interface ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

Karen Renaud, Merrill Warkentin, George Westerman
Incident Metrics in SRE

Incident Metrics in SRE

Stepan Davidovic

Publisher Resources

ISBN: 0596005423Supplemental ContentCatalog PageErrata