Hello, I''m having trouble getting AWS running, its too unreliable when using XMLRPC; in 100 requests, 17 randomly fail with the error "Casting of method parameters failed". Please review the steps I''ve done bellow, and let me known what I''m doing wrong, and what I can do this fix this. I''m using ruby 1.8.2, rails-0.13.1, actionpack-1.9.1, and actionwebservice-0.8.1. Thanks, Rui Lopes NB: At the end of email you can see the stack trace; if this email has wrapped lines, please see http://www.ruilopes.com/tmp/rails_aws.txt $ rails aws_test $ aws_test/script/generate web_service service/test struct $ cat > aws_test/app/apis/service/test_api.rb class StructData < ActionWebService::Struct member :one, :time member :two, :int member :three, [[:int, :int]] member :four, [[:int, :int, :int, :int]] end class Service::TestApi < ActionWebService::API::Base api_method :struct, :expects => [{:data => StructData}] end $ cat > aws_test/app/controllers/service/test_controller.rb class Service::TestController < ApplicationController wsdl_service_name ''Service::Test'' def struct data raise(ArgumentError, ''Unkown data type'') unless data.class == StructData end end $ cat > stress.rb #!/usr/local/bin/ruby -w require "xmlrpc/client" require "time" data = { "one" => Time.now, "two" => 2, "three" => [[1, 3], [1, 4]], "four" => [[2, 1, 200, 10], [2, 2, 20, 1]], } api = XMLRPC::Client.new("localhost", "/service/test/api", 3000) n = 0 errors = 0 100.times do |n| puts "." if n % 20 == 0 begin api.call("Struct", data) rescue XMLRPC::FaultException errors += 1 rescue Interrupt break end end puts "%d errors in %d requests" % [errors, n+1] $ aws_test/script/server # run this in another shell. $ ruby stress.rb . . . . . 17 errors in 100 requests Errors on log (the first is a request then went OK, the second is one that fails): Processing TestController#api (for 127.0.0.1 at Tue Oct 18 12:18:17 WEST 2005) Parameters: {"methodName"=>"Struct", "action"=>"api", "params"=>{"param"=>{"value"=>{"struct"=>{"member"=>[{"name"=>"four", "value"=>{"array"=>{"data"=>{"value"=>[{"array"=>{"data"=>{"value"=>[{"int"=>"2"}, {"int"=>"1"}, {"int"=>"200"}, {"int"=>"10"}]}}}, {"array"=>{"data"=>{"value"=>[{"int"=>"2"}, {"int"=>"2"}, {"int"=>"20"}, {"int"=>"1"}]}}}]}}}}, {"name"=>"three", "value"=>{"array"=>{"data"=>{"value"=>[{"array"=>{"data"=>{"value"=>[{"int"=>"1"}, {"int"=>"3"}]}}}, {"array"=>{"data"=>{"value"=>[{"int"=>"1"}, {"int"=>"4"}]}}}]}}}}, {"name"=>"two", "value"=>{"int"=>"2"}}, {"name"=>"one", "value"=>{"dateTime.iso8601"=>"20051018T12:17:50"}}]}}}}, "controller"=>"service/test"} Web Service Request: Struct(data=>#<StructData:0x40a8034c @four=[[2, 1, 200, 10], [2, 2, 20, 1]], @three=[[1, 3], [1, 4]], @two=2, @one=Tue Oct 18 12:18:17 WEST 2005>) Entrypoint: api <?xml version=''1.0''?> <methodCall> <methodName>Struct</methodName> <params> <param> <value><struct> <member> <name>four</name> <value><array><data> <value><array><data> <value><int>2</int></value> <value><int>1</int></value> <value><int>200</int></value> <value><int>10</int></value> </data></array></value> <value><array><data> <value><int>2</int></value> <value><int>2</int></value> <value><int>20</int></value> <value><int>1</int></value> </data></array></value> </data></array></value> </member> <member> <name>three</name> <value><array><data> <value><array><data> <value><int>1</int></value> <value><int>3</int></value> </data></array></value> <value><array><data> <value><int>1</int></value> <value><int>4</int></value> </data></array></value> </data></array></value> </member> <member> <name>two</name> <value><int>2</int></value> </member> <member> <name>one</name> <value><dateTime.iso8601>20051018T12:17:50</dateTime.iso8601></value> </member> </struct></value> </param> </params> </methodCall> Web Service Response (0.002538): => true <?xml version="1.0" ?><methodResponse><params><param><value><boolean>1</boolean></value></param></params></methodResponse> Sending data Completed in 0.01884 (53 reqs/sec) | Rendering: 0.00117 (6%) [http://localhost/service/test/api] Processing TestController#api (for 127.0.0.1 at Tue Oct 18 12:18:17 WEST 2005) Parameters: {"methodName"=>"Struct", "action"=>"api", "params"=>{"param"=>{"value"=>{"struct"=>{"member"=>[{"name"=>"four", "value"=>{"array"=>{"data"=>{"value"=>[{"array"=>{"data"=>{"value"=>[{"int"=>"2"}, {"int"=>"1"}, {"int"=>"200"}, {"int"=>"10"}]}}}, {"array"=>{"data"=>{"value"=>[{"int"=>"2"}, {"int"=>"2"}, {"int"=>"20"}, {"int"=>"1"}]}}}]}}}}, {"name"=>"three", "value"=>{"array"=>{"data"=>{"value"=>[{"array"=>{"data"=>{"value"=>[{"int"=>"1"}, {"int"=>"3"}]}}}, {"array"=>{"data"=>{"value"=>[{"int"=>"1"}, {"int"=>"4"}]}}}]}}}}, {"name"=>"two", "value"=>{"int"=>"2"}}, {"name"=>"one", "value"=>{"dateTime.iso8601"=>"20051018T12:17:50"}}]}}}}, "controller"=>"service/test"} Casting of method parameters failed Web Service Request: Struct(data=>{"two"=>2, "three"=>[[1, 3], [1, 4]], "one"=>#<XMLRPC::DateTime:0x409b8658 @day=18, @sec=50, @month=10, @min=17, @year=2005, @hour=12>, "four"=>[[2, 1, 200, 10], [2, 2, 20, 1]]}) Entrypoint: api <?xml version=''1.0''?> <methodCall> <methodName>Struct</methodName> <params> <param> <value><struct> <member> <name>four</name> <value><array><data> <value><array><data> <value><int>2</int></value> <value><int>1</int></value> <value><int>200</int></value> <value><int>10</int></value> </data></array></value> <value><array><data> <value><int>2</int></value> <value><int>2</int></value> <value><int>20</int></value> <value><int>1</int></value> </data></array></value> </data></array></value> </member> <member> <name>three</name> <value><array><data> <value><array><data> <value><int>1</int></value> <value><int>3</int></value> </data></array></value> <value><array><data> <value><int>1</int></value> <value><int>4</int></value> </data></array></value> </data></array></value> </member> <member> <name>two</name> <value><int>2</int></value> </member> <member> <name>one</name> <value><dateTime.iso8601>20051018T12:17:50</dateTime.iso8601></value> </member> </struct></value> </param> </params> </methodCall> ArgumentError (Unkown type.): /app/controllers/service/test_controller.rb:5:in `struct'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/invocation.rb:144:in `send'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/invocation.rb:144:in `perform_invocation_without_interception'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/invocation.rb:138:in `perform_invocation'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/abstract.rb:44:in `web_service_filtered_invoke'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/abstract.rb:35:in `web_service_direct_invoke_without_controller'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:111:in `web_service_direct_invoke'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/abstract.rb:21:in `invoke_web_service_request'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:53:in `dispatch_web_service_request'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:51:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionwebservice-0.8.1/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:51:in `dispatch_web_service_request'' (eval):1:in `api'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'' /usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/lib/ruby/1.8/webrick/server.rb:172:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:161:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:161:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'' /usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in `dispatch'' script/server:49 Web Service Response: => #<XMLRPC::FaultException: XMLRPC::FaultException> <?xml version="1.0" ?><methodResponse><fault><value><struct><member><name>faultCode</name><value><i4>2</i4></value></member><member><name>faultString</name><value><string>Unkown type.</string></value></member></struct></value></fault></methodResponse> Sending data Completed in 0.02161 (46 reqs/sec) | Rendering: 0.00073 (3%) [http://localhost/service/test/api]