# Amazon Webservice + soap/wsdlDriver =\> weird errors

**URL:** <https://www.ruby-forum.com/t/amazon-webservice-soap-wsdldriver-weird-errors/113826>\
**Category:** Ruby\
**Created:** [September 5, 2007, 10:50am UTC](https://www.ruby-forum.com/t/amazon-webservice-soap-wsdldriver-weird-errors/113826 "2007-09-05T10:50:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![22marine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/2/3ab097/32.png) [@22marine](https://www.ruby-forum.com/u/22marine)\
**Post date:** [September 5, 2007, 10:50am UTC](https://www.ruby-forum.com/t/amazon-webservice-soap-wsdldriver-weird-errors/113826/1 "2007-09-05T10:50:17Z")

</div>

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](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/xml?Service=AWSECommerceService&SubscriptionId=[access\_key\_HERE]&Operation=ItemLookup&SearchIndex=Books&IdType=ISBN&ItemId=2841773884](http://webservices.amazon.fr/onca/xml?Service=AWSECommerceService&SubscriptionId=%5Baccess_key_HERE%5D&Operation=ItemLookup&SearchIndex=Books&IdType=ISBN&ItemId=2841773884)

if someone can help…

thanks.

PB
