We now have a little more detail about how the Internet UPC Database and ECS work beyond just knowing that one is an XML-RPC service and one is a REST service. We can start mashing up.
Our mashup will use ECS and the UPC Database services to do the following:
1. A form will take the UPC, short UPC, or EAN to lookup the full UPC at Internet UPC Database.
2. Find the price and product information using Amazon’s ECS. Display this on our site.
3. Offer the visitor the chance to buy this item.
4. If they wish to buy it, add the item to a shopping cart using ECS.
5. Pass the user to Amazon.com for checkout.
The following code listings are included in the example code, and, provided that you substitute your own Amazon Access Key, is a functioning version of the mashup. For the sake of brevity, I will include each entire script page and comment on them as we go.