Titou Titou
2007-Sep-06 07:56 UTC
Amazon E-commerce Webservice + soap/wsdlDriver = weird error
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/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---