A Client Against the Amazon E-Commerce Service

Amazon Web Services is an umbrella for Amazon’s pioneering contributions, in infrastructure and applications, to web services. From early on, Amazon pushed hard to make its web sites for shopping, storage (S3, Simple Storage Service), utility-priced cloud computing (EC2), and so on available as web services, too. Among the prominent hosts of web services, Amazon is unusual in offering both SOAP-based and REST-style versions of such services. This chapter and later ones have code examples that involve Amazon’s E-Commerce or shopping service (see Registering with Amazon), which requires an accessId and a secretKey for access. The accessId is inserted, as is, into any request against the E-Commerce service; the secretKey is used to create what Amazon calls a signature, which is likewise inserted into every request and then verified on the Amazon side. The secretKey itself is not inserted into a request.

The RestfulAmazon client (see Example 3-2) is relatively clean code but only because the messy details are isolated ...

Get Java Web Services: Up and Running, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.