String DESTINATION = "https://ecs.amazonaws.com/onca/soap?Service=AWSECommerceService";
String MY_AWS_ID = "ACCESS_ID";
String MY_AWS_SECRET = "SECRET_ID";
ItemSearchRequest objRequest = new ItemSearchRequest();
objRequest.SearchIndex = "Books";
objRequest.Power = "ISBN:9780557230648";
objRequest.ResponseGroup = new string[] { "Small", "AlternateVersions", "Large", "Medium", "Offers" };
objRequest.Sort = "salesrank";
ItemSearchRequest[] requests = new ItemSearchRequest[] { objRequest };
ItemSearch itemSearch = new ItemSearch();
itemSearch.AWSAccessKeyId = MY_AWS_ID;
itemSearch.Request = requests;
// create an instance of the serivce
AWSECommerceService api = new AWSECommerceService();
// set the destination
api.Destination = new Uri(DESTINATION);
// apply the security policy, which will add the require security elements to the
// outgoing SOAP header
AmazonHmacAssertion amazonHmacAssertion = new AmazonHmacAssertion(MY_AWS_ID, MY_AWS_SECRET);
api.SetPolicy(amazonHmacAssertion.Policy());
// make the call and print the title if it succeeds
try
{
ItemSearchResponse response = api.ItemSearch(itemSearch);
Items info = response.Items[0];
Item[] items = info.Item;
for (int i = 0; i < items.Length; i++)
{
Label1.Text += "Book Title: " + items[i].ItemAttributes.Title.ToString() + "<br />";}
}
catch (Exception ex)
{
Label1.Text += ex.Message.ToString();
}
Note:-
==================================================
AmazonHmacAssertion class is available in client project of below link
http://associates-amazon.s3.amazonaws.com/signed-requests/samples/amazon-product-advt-api-sample-csharp-soap.zip