Amazon Webservice + soap/wsdlDriver => weird errors

T

Titou Titou

Hi,

I'm trying to use amazon E-commerce Webservice using soap/wsdlDriver.
The idea is that a user gives an ISBN, ant to get book informations.

Here's my code :

require 'soap/wsdlDriver'

URL =
'http://webservices.amazon.com/AWSECommerceService/FR/AWSECommerceService.wsdl'

access_key = 'XXXXXXX'

my_isbn10 = '2841773884' # Pratique de Ruby on Rails - Eric Sarrion

factory = SOAP::WSDLDriverFactory.new(URL).create_rpc_driver

mes_params = {
'AWSAccessKeyId' => access_key,
'Service'=>'AWSECommerceService',
'SearchIndex' => 'Books',
'IdType' => 'ISBN',
'ItemId' => my_isbn10
}

result = factory.ItemLookup(mes_params)
puts result.inspect

bud i get a weird error :

Message="Your request is missing required parameters. Required
parameters include ItemId."

I tried changing my hash this way :

mes_params = {
'AWSAccessKeyId' => access_key,
'Service'=>'AWSECommerceService',
'Request' => {
'SearchIndex' => 'Books',
'IdType' => 'ISBN',
'ItemId' => my_isbn10
}
}

but then, another error occured :

Message="You have exceeded the maximum number of batch requests per
operation. Each operation may include no more than 2 batch requests."

more strange if possible, when using directly the REST request in my
browser, i get the expected result :

http://webservices.amazon.fr/onca/x...archIndex=Books&IdType=ISBN&ItemId=2841773884

if someone can help...

thanks.

PB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top