views:

398

answers:

2

I'm struggling with the final part of getting my first bit of code working with the AWS - I have got this far, I attached the web reference in VS and this have this

amazon.AWSECommerceService service = new amazon.AWSECommerceService();

// prepare an ItemSearch request
amazon.ItemSearchRequest request = new amazon.ItemSearchRequest();
request.SearchIndex = "DVD";
request.Title = "scream";
request.ResponseGroup = new string[] { "Small" };

amazon.ItemSearch itemSearch = new amazon.ItemSearch();
itemSearch.AssociateTag = "";
itemSearch.Request = new ItemSearchRequest[] { request };
itemSearch.AWSAccessKeyId = ConfigurationManager.AppSettings["AwsAccessKeyId"];

itemSearch.Request = new ItemSearchRequest[] { request };
ItemSearchResponse response = service.ItemSearch(itemSearch);

// write out the results
foreach (var item in response.Items[0].Item)
{
    Response.Write(item.ItemAttributes.Title + "<br>");
}

I get the error

The request must contain the parameter Signature.

I know you have to 'sign' requests now, but can't figure out 'where' I would do this or how? any help greatly appreciated?

+1  A: 

You have to add to the SOAP request headers including your Amazon access key ID, a timestamp, and the SHA256 hash of the request operation and the timestamp. To accomplish that, you would need access to the SOAP message just before it is going to be sent out. There's a walkthrough and a sample project I put together at http://flyingpies.wordpress.com/2009/08/01/17/.

Oren Trutner
Hi - I followed your tutorial before I posted this, but could not get it to work in my web application. Every time it just could not understand what AWSECommerceServicePortTypeClient was? I managed to get some sample code working from Amazon in the end - But I had to install Microsoft WSE 3.0 and remove my web reference :S Bloody crazy amount of work to get something to simple working!!!
leen3o
A: 

HI Thank you for the post and i want to access amazon data base example video games i dont want to pass any search text but rather i need complete list of games under video games category can i access this please any body help me out

test