Amazon.com : Java Glossary

The JDisplay Java Applet displays the large program listings on this web page. JDisplay requires an up-to-date browser and Java version 1.5+, preferably 1.7.0_04. If you can’t see the listings, or if you just want to learn more about JDisplay, click  here for help.
Amazon logo
Amazon.com

boycott Unfortunately Amazon has been applying bogus software patents to its competitors. They patented the use of the cookie for e-commerce, and have also patented one-click sales and the use of commissioned referring sites. So please use the Bookstores section to find alternate bookstores. You might also follow the boycott link and add your website to it.

Programmer API IsASINInStock
Other Countries Tips
TestItemSearch: Sample Code For Amazon AWS Books
AwsHandlerResolver Links
FetchBookFacts

Amazon.com is an enormous online bookstore that carries many Java related books. If you visit them by clicking on the logo, I get a 5% commission on any books, tapes or CD (Compact Disk)s you buy. The main disadvantages of shopping this way, is, if you elect standard ground shipping, you can wait 4 to 10 weeks for delivery and you can’t peruse the entire books. The main advantage is the huge selection. If you click the logo, you will be taken to the store. To search by ISBN (International Standard Book Number), click book search then ISBN when you get there or go directly to ISBN search. To do searches combining incomplete information about author, title etc. click book search then power search once you get there.

Besides books, Amazon now sells electronics, DVD (Digital Video Disk) s, food, and magazine subscriptions.

You can do a variety of affiliate links to the Amazon.com website:

Types of Links To Amazon.com

text link

to a specific book
Buy Java Persistence with Hibernate

image link

to a specific book

search box

CMP (Canadian Mind Products) Book Macros

book cover recommend book⇒Java Concurrency in Practice
by:Brian Goetz, Tim Peierls, Joshua J. Bloch, Joseph Bowbeer, David Holmes, Doug Lea 978-0-321-34960-6paperback
publisher:Addison-Wesley B004V9OA84kindle
published:2006-05-19
Bloch and Lea especially have very good reputations in concurrent programming. This is the dream team to write such a book.
Australian flag abe books anz abe books.co.uk UK flag
German flag abe books.de amazon.co.uk UK flag
German flag amazon.de abe books.ca Canadian flag
Spanish flag iberlibro.com amazon.ca Canadian flag
Spanish flag amazon.es Chapters Indigo Canadian flag
French flag abe books.fr abe books.com American flag
French flag amazon.fr amazon.com American flag
Italian flag abe books.it Barnes & Noble American flag
Italian flag amazon.it Powells American flag
American flag download O’Reilly Safari download Sony e-books American flag
Kobo UN flag
Greyed out stores probably do not have the item in stock

Programmer API (Application Programming Interface)

Screen scraping will drive you insane at Amazon because the pages are formatted inconsistently, they make ever increasing use of JavaScript, and they change the layouts frequently just to keep things interesting.

Thankfully, they have created a programmer’s API. called AWS (Amazon Web Services) or more recently the PA-API (Product Advertising Application Programming Interface). Actually there are dozens of dozens of them actually, to let you do all manner of things including getting the information about a book in computer-friendly, and reasonably stable form — XML (extensible Markup Language)/SOAP (Simple Object Access Protocol). Each country has its own servers, own accounts, own passwords, own XML schema… Unfortunately for batch processes, they don’t want you to do more than 200 inquiries per hour. Oddly, the problem is too much documentation and too many samples. You are overwhelmed. Don’t try to make sense of the complicated stuff until you gave found introductory docs and mastered the basics. Read the Getting Started Guide first. To help avoid overloading Amazon’s servers, find a response format that includes just what you need. Amazon issues you user IDs and passwords to use on all queries so they can track what you are up to with the API. They also insist that all queries be digitally signed and sent with HTTPS (Hypertext Transfer Protocol over SSL (Secure Socket Layer)). You can sign by computing your own RFC 2104-compliant HMAC-SHA256 digital signature, or you can use Oasis WSS (Web Services Security) SOAP -Style signing, using your own X.509 certificate or one provided by Amazon. I guess they are preparing for a sophisticated DOS (Denial Of Service attack) attack.

To use it you will need:

You don’t need AWS SDK (Software Development Kit). All you need is AWSECommerceService.wsdl, and Java’s built-in JAX features.

There is a utility called the Amazon Product Advertising API Signed Requests Helper that helps you understand how queries are constructed. It sorts the parameters alphabetically, adds a timestamp and digitally signs the request to form a GET URL (Uniform Resource Locator). It is out of date. It fails to mention the &AssociateTag=canadianmindprod mandatory parameter. It is set up for Version=2009-03-31 rather than Version=2010-11-01. It does not work in Opera. All queries use the same service, Service=AWSECommerceService but a different Operation=ItemSearch, Operation=ItemLookup etc. Here is what a typical query looks like:

Fields to use in your inquiries you may find of interest include:

Fields of interest in the responses include:

The XML response has a complex tree structure, it is not just a matter of requesting the field you want.

You can batch up to ten queries in on request.

They also have SDK s for half a dozen languages. I don’t know much about it.

Other Countries

The endpoints/servers can be accessed with http: or https:.
Country Port Name Endpoint
Canada https://webservices.amazon.ca/onca/soapAWSECommerceServicePortCA
China https://webservices.amazon.cn/onca/soapAWSECommerceServicePortCN
France https://webservices.amazon.fr/onca/soapAWSECommerceServicePortFR
Germany https://webservices.amazon.de/onca/soapAWSECommerceServicePortDE
Great Britain https://webservices.amazon.co.uk/onca/soapAWSECommerceServicePortUK
Italy https://webservices.amazon.it/onca/soapAWSECommerceServicePortIT
Japan https://webservices.amazon.jp/onca/soapAWSECommerceServicePortJP
Spain https://webservices.amazon.es/onca/soapdoes not have one. Spain in not yet supported via SOAP.
USA https://webservices.amazon.com/onca/soapAWSECommerceServicePort or AWSECommerceServicePortUS

The web is littered with obsolete lists of the endpoint urls. You can find the most recent list inside AWSECommerceService.wsdl. You don’t use the endpoints directly unless you are experimenting with Amazon Product Advertising API Signed Requests Helper. Otherwise you use the corresponding port getter e.g. AWSECommerceService.getAWSECommerceServicePortCA() or AWSECommerceService.getAWSECommerceServicePort(); and JAX looks effectively looks up the corresponding end point in AWSECommerceService.wsdl (using pregenerated code).

TestItemSearch: Sample Code For Amazon AWS API

It took weeks to get this little sample program to use the Amazon AWS API working. Even the Signed Requests Helper utility took days to get working. The problem is Amazon makes their API more and more complicated each year, but do not update the documentation, and they refuse to provide complete example code. I have never in my career of 49 years seen a more incompetently documented API. Further the API is not consistent. Further it is often idiotic, e.g. returning the number of results as a BigInteger when even a short would have done fine.

AwsHandlerResolver

I downloaded this AwsHandlerResolver code from the Amazon website, then modified it to use the more compact CMP Base64 classes. AwsHandlerResolver handles the poorly documented stuff like adding a timestamp, digitally signing your request and Base64 ASCII-armouring the signature.

FetchBookFacts

The following is a more complicated example. You give it an ISBN-13 (aka EAN (European Article Number) ) on the command line and it probes the Amazon API to find the title, author, publisher, published date. It also probes for the ISBN-13s of alternate bindings, e.g. Paperback, Hardcover, Kindle, Audio. It creates a text file (in the form of an HTML (Hypertext Markup Language) macro) summarising this information and downloads the large bookcover image. It does not include the author birth/death dates since Amazon does not track them. On my website, those fields are added later by code part of HTMLMacros.

view

IsASINInStock

The following takes either an isbn13 or asin and probes the Amazon.com AWS API to find out if the product is in stock. The results do not correspond well with the information on the website. I don’t know which is actually correct.

Tips

Books

book cover recommend book⇒Programming Amazon Web Services: S3, EC2, SQS, FPS, and SimpleDB
by:James Murty 978-0-596-51581-2paperback
publisher:O’Reilly recommended 978-0-596-55179-7ebook
published:2008-04-01 B004OR1JF0kindle

It covers:

  • S3 : online storage to store and retrieve data
  • EC2 : online computing to be able to run jobs on a farm of machines
  • SQS : web messaging infrastructure for computer-computer communication
  • FPS : flexible payment system for moving money online
  • SimpleDB : store and retrieve datasets online

It is about doing your computing by renting Amazon servers. It is not about using the AWS Amazon Product Advertising API to do book referrals.

Australian flag abe books anz abe books.co.uk UK flag
German flag abe books.de amazon.co.uk UK flag
German flag amazon.de abe books.ca Canadian flag
Spanish flag iberlibro.com amazon.ca Canadian flag
Spanish flag amazon.es Chapters Indigo Canadian flag
French flag abe books.fr abe books.com American flag
French flag amazon.fr amazon.com American flag
Italian flag abe books.it Barnes & Noble American flag
Italian flag amazon.it Powells American flag
American flag download O’Reilly Safari Sony e-books American flag
download Kobo UN flag
Greyed out stores probably do not have the item in stock

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/amazon.html J:\mindprod\jgloss\amazon.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.211]
You are visitor number 10,936.