In that request fort help - there was a typo Last part of message should be as follows, HmacSHA1 being replaced with HmacSHA256:
END ENTIRE CF CODE: ****************************** So, what happens when you run this? Well, you get an output like this which is correct EXCEPT for the signature: http://ecs.amazonaws.com/onca/xml?AssociateTag=YOUR-ASSOCIATE-ID&AWSAccessKeyId=YOUR-AWS-ACCESS-JEY&IdType=ASIN&ItemId=iPad2&MerchantID=Amazon&Operation=ItemLookup&ResponseGroup=Large&SearchIndex=Electronics&Service=AWSECommerceService&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-11-10T16%3A32%3A40.00Z&Version=2011-08-01&Signature=Cbojm2j3XyG8i%2FweIT%2Fzkt4uff4wWjcqLHwwg8EkG0I%3D HOW DO I KNOW THAT THE REQUEST IS CORRECT - - EXCEPT FOR THE SIGNATURE? Test the code at http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html ...by entering the URL created by the CF code above - except for the time stamp and the signature at the end: http://ecs.amazonaws.com/onca/xml?AssociateTag=YOUR-ASSOCIATE-ID&AWSAccessKeyId=YOUR-AWS-ACCESS-JEY&IdType=ASIN&ItemId=iPad2&MerchantID=Amazon&Operation=ItemLookup&ResponseGroup=Large&SearchIndex=Electronics&Service=AWSECommerceService&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2011-08-01 remove this part ==> &Timestamp=2011-11-10T16%3A32%3A40.00Z and remove this part ==> &Signature=Cbojm2j3XyG8i%2FweIT%2Fzkt4uff4wWjcqLHwwg8EkG0I%3D The Amazon request helper will then generate the time stamp and signature for you, then cut and paste the final Signed URL that Amazon generates into a browser address bar and you will get the XML data back as you should. However, if you test your output WITH the signature, you will get: <?xml version="1.0"?> <ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2011-08-01/"><Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message></Error><RequestID>cdddeba5-953a-4315-8248-9bdc0101101e</RequestID></ItemLookupErrorResponse> ****************************** Encryption seems to be a major PITA in CF. But the function at the start of this code is Java and so it woudl seem that the problem is with Java and getting Java to generate the correct signature. But, I'm not a Java pro, so I don't know. This could be as easy as installing the correct Java encryption library, but I've not been successful in discovering what that is. So, if that's the problem and you know, well you just made a little cash. __________________ Derrick Peavy [email protected] 404-786-5036 “Innovation distinguishes between a leader and a follower.” - Steve Jobs "In economics, the majority is always wrong." - John Kenneth Galbraith "Faced with the choice between changing one’s mind and proving there is no need to do so, almost everyone gets busy on the proof." - John Kenneth Galbraith _____________________ ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
