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

**URL:** <https://rubytalk.org/t/amazon-webservice-soap-wsdldriver-weird-errors/40394>\
**Category:** ruby-talk\
**Created:** [5 September 2007 08:50 UTC](https://rubytalk.org/t/amazon-webservice-soap-wsdldriver-weird-errors/40394 "2007-09-05T08:50:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Titou\_Titou](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Titou\_Titou](https://rubytalk.org/u/Titou_Titou)\
**Post date:** [5 September 2007 08:50 UTC](https://rubytalk.org/t/amazon-webservice-soap-wsdldriver-weird-errors/40394/1 "2007-09-05T08:50:20Z")

</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 = {  
&nbsp;&nbsp;&nbsp;&nbsp;'AWSAccessKeyId' =\> access\_key,  
&nbsp;&nbsp;&nbsp;&nbsp;'Service'=\>'AWSECommerceService',  
&nbsp;&nbsp;&nbsp;&nbsp;'SearchIndex' =\> 'Books',  
&nbsp;&nbsp;&nbsp;&nbsp;'IdType' =\> 'ISBN',  
&nbsp;&nbsp;&nbsp;&nbsp;'ItemId' =\> my\_isbn10  
&nbsp;&nbsp;}

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 = {  
&nbsp;&nbsp;&nbsp;&nbsp;'AWSAccessKeyId' =\> access\_key,  
&nbsp;&nbsp;&nbsp;&nbsp;'Service'=\>'AWSECommerceService',  
&nbsp;&nbsp;&nbsp;&nbsp;'Request' =\> {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'SearchIndex' =\> 'Books',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'IdType' =\> 'ISBN',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'ItemId' =\> my\_isbn10  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;}

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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
