Sha256: c481cb267f7eb898c23c2c93079945457606840a1a4ae8aec311361c9bd152ab

Contents?: true

Size: 1.13 KB

Versions: 5

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby
# encoding: ASCII-8BIT

# This file is a sample based on AmazonSearchServiceClient.rb, which can be
# generated by WSDL file and wsdl2ruby.rb.
#
# $ wsdl2ruby.rb --type client --force \
#   --wsdl http://soap.amazon.com/schemas3/AmazonWebServices.wsdl
#
# See wsdlDriver.rb to use WSDL file directly (slow).
require 'AmazonSearchDriver.rb'

endpoint_url = ARGV.shift
obj = AmazonSearchPort.new(endpoint_url)

# Uncomment the below line to see SOAP wiredumps.
# obj.wiredump_dev = STDERR

# SYNOPSIS
#   KeywordSearchRequest(keywordSearchRequest)
#
# ARGS
#   keywordSearchRequest		KeywordRequest - {urn:PI/DevCentral/SoapService}KeywordRequest
#
# RETURNS
#   return		ProductInfo - {urn:PI/DevCentral/SoapService}ProductInfo
#
# RAISES
#    N/A
#
keywordSearchRequest = KeywordRequest.new("Ruby Object", "1", "books", "webservices-20", "lite", "", "+salesrank")
obj.keywordSearchRequest(keywordSearchRequest).Details.each do |detail|
  puts "== #{detail.ProductName}"
  puts "Author: #{detail.Authors.join(", ")}"
  puts "Release date: #{detail.ReleaseDate}"
  puts "List price: #{detail.ListPrice}, our price: #{detail.OurPrice}"
  puts
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
soap5r-2.0.3 sample/showcase/wsdl/amazon/sampleClient.rb
soap5r-2.0.2 sample/showcase/wsdl/amazon/sampleClient.rb
soap5r-2.0.1 sample/showcase/wsdl/amazon/sampleClient.rb
soap5r-2.0.0 sample/showcase/wsdl/amazon/sampleClient.rb
soap5r-2.0.0.20120130130121 sample/showcase/wsdl/amazon/sampleClient.rb