title: Amazon product search API: Not Working
body: <p>I am using Amazon web services to get the product Price.</p>
  
  <p>It was working fine but after the Amazon made the changes in the API in which associateTag becomes mandatory Parameter,it started giving an Error. So i put an associated tag in the request as: </p>
  
  <pre><code>tempQueryString =[NSString stringWithFormat:@"GET\necs.amazonaws.com\n/onca/xml\nAWSAccessKeyId=AKIAJ3A3LA5NYXWPSTGQ&amp;IdType=ASIN&amp;ItemId=B003VKR0J0&amp;MerchantId=Amazon&amp;AssociateTag=babyformu-20&amp;Operation=ItemLookup&amp;ResponseGroup=Large&amp;Service=AWSECommerceService&amp;SignatureVersion=2&amp;SignatureMethod=HmacSHA256&amp;Timestamp=%@T%@%@%@Z&amp;Version=2010-01-01",str2,hour,mint,s];
  </code></pre>
  
  <p>Now it is Giving this error:<BR>
  <code>"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."</code></p>
  
  <p>I did not make any changes in the signing method.
  Here it is:</p>
  
  <pre><code>NSString *key = @"9at/FN4mouFxnIV2SsoQTR4iO6x6AWVt2xFvEwmv"; // private key
      NSLog(@"current:    %@ ",queryString);
      NSString *data = queryString;
      const char *cKey  = [key cStringUsingEncoding:NSASCIIStringEncoding];
      const char *cData = [data cStringUsingEncoding:NSASCIIStringEncoding];
      unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH];
      CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC);
      NSData *HMAC = [[NSData alloc] initWithBytes:cHMAC
                                            length:sizeof(cHMAC)];
      hash = [HMAC base64Encoding];
      NSLog(@"hash value11 == %@",hash);
      encodedString = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)hash, NULL, CFSTR(":/?#[]@!$&amp;’()*+,;="), kCFStringEncodingUTF8);
  </code></pre>
  
  <p>I am using this api to get the product detail:</p>
  
  <p><code>query=[NSString  stringWithFormat:@"http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAJ3A3LA5NYXWPSTGQ&amp;IdType=ASIN&amp;ItemId=B003VKR0J0&amp;AssociateTag=babyformu-20&amp;MerchantId=Amazon&amp;Operation=ItemLookup&amp;ResponseGroup=Large&amp;Service=AWSECommerceService&amp;Timestamp=%@T%@:%@:%@Z&amp;Version=2009-03-31&amp;Signature=%@",str2,h,m,s,encodedString];</code></p>
  
  <p>Thanks in advance.</p>