Amazon Webservice + soap/wsdlDriver => weird errors

Discussion in 'Ruby' started by Titou Titou, Sep 5, 2007.

  1. Titou Titou

    Titou Titou Guest

    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/xml?Service=AWSECommerceService&SubscriptionId=[access_key_HERE]&Operation=ItemLookup&SearchIndex=Books&IdType=ISBN&ItemId=2841773884

    if someone can help...

    thanks.

    PB
    --
    Posted via http://www.ruby-forum.com/.
    Titou Titou, Sep 5, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    194
    NAKAMURA, Hiroshi
    Sep 16, 2005
  2. Jared Richardson

    Proxy question when using soap/wsdlDriver

    Jared Richardson, Mar 23, 2006, in forum: Ruby
    Replies:
    1
    Views:
    158
    David Ishmael
    Mar 23, 2006
  3. Replies:
    0
    Views:
    167
  4. Tadeusz Bochan

    Help needed with soap/wsdlDriver

    Tadeusz Bochan, Aug 25, 2006, in forum: Ruby
    Replies:
    0
    Views:
    120
    Tadeusz Bochan
    Aug 25, 2006
  5. Alin Alin

    rubygems soap/wsdlDriver issue

    Alin Alin, Jan 16, 2007, in forum: Ruby
    Replies:
    2
    Views:
    114
    Alin Popa
    Jan 16, 2007
Loading...

Share This Page