提到的错误是在防火墙后面调用API,但我正在尝试从EngineYard实例访问API。 EngineYard实例IP在其防火墙中列为白色。
client = Savon.client(wsdl: "https://amagentostore.com/api/v2_soap?wsdl", read_timeout: 300, follow_redirects: true)
products = client.
call(:dcapimodule_product_list, message: { session_id: session_id, additional_attributes: @additional_attributes }).
body[:dcapimodule_product_list_response][:products][:item]
我收到以下错误
File "/usr/lib64/ruby/2.3.0/openssl/buffering.rb" line 178 in sysread_nonblock
File "/usr/lib64/ruby/2.3.0/openssl/buffering.rb" line 178 in read_nonblock
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/socket.rb" line 46 in readline
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/response.rb" line 63 in parse
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/middlewares/response_parser.rb" line 7 in response_call
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/connection.rb" line 389 in response
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/connection.rb" line 253 in request
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/excon-0.59.0/lib/excon/connection.rb" line 314 in post
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/excon.rb" line 25 in request
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/httpi-2.4.2/lib/httpi.rb" line 161 in request
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/httpi-2.4.2/lib/httpi.rb" line 133 in post
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/savon-2.11.2/lib/savon/operation.rb" line 94 in block in call_with_logging
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/savon-2.11.2/lib/savon/request_logger.rb" line 12 in log
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/savon-2.11.2/lib/savon/operation.rb" line 94 in call_with_logging
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/savon-2.11.2/lib/savon/operation.rb" line 54 in call
File "/data/feed_champion/shared/bundled_gems/ruby/2.3.0/gems/savon-2.11.2/lib/savon/client.rb" line 36 in call
File "/data/feed_champion/releases/20180110042633/app/services/magento/product.rb" line 84 in products
有什么想法吗?
答案 0 :(得分:0)
当WSDL期待一个数组时,问题是@additional_attributes
是nil
。