I am having an issue where I am trying to test a weservice that I wrote
by
connecting to it from ruby. When I submit my form that calls the
webservice
it times out. you can see from the lighttpd log that the webservice
completes just after the timeout. any ideas? am I doing something
wrong?
---- source ----
def validate
auth = ActionWebService::Client::Soap.new(AuthApi, "
http://localhost:3000/auth/api")
if params[:user]
if auth.validate(params[:user][:username],
params[:user][:password])
flash[:valid] = params[:user][:username] + ’ Successfull’
else
flash[:valid] = params[:user][:username] + ’ Failed’
end
end
end
---- loghttpd log ----
Processing UsersController#validate (for 127.0.0.1 at 2006-05-24
22:23:46)
[GET]
Session ID: 2129cb461e45d4a67b014b4d265a9cda
Parameters: {“action”=>“validate”, “controller”=>“users”}
Rendering within layouts/users
Rendering users/validate
Completed in 0.08427 (11 reqs/sec) | Rendering: 0.00422 (5%) | 200 OK [
http://localhost/users/validate]
Processing UsersController#validate (for 127.0.0.1 at 2006-05-24
22:24:02)
[POST]
Session ID: 2129cb461e45d4a67b014b4d265a9cda
Parameters: {“user”=>{“username”=>“testuser”, “password”=>“testpass”},
“commit”=>“Validate”, “action”=>“validate”, “controller”=>“users”}
Timeout::Error (execution expired):
/usr/local/lib/ruby/1.8/timeout.rb:54:in rbuf_fill' /usr/local/lib/ruby/1.8/timeout.rb:56:in
timeout’
/usr/local/lib/ruby/1.8/timeout.rb:76:in timeout' /usr/local/lib/ruby/1.8/net/protocol.rb:132:in
rbuf_fill’
/usr/local/lib/ruby/1.8/net/protocol.rb:116:in readuntil' /usr/local/lib/ruby/1.8/net/protocol.rb:126:in
readline’
/usr/local/lib/ruby/1.8/net/http.rb:1988:in read_status_line' /usr/local/lib/ruby/1.8/net/http.rb:1977:in
read_new’
/usr/local/lib/ruby/1.8/net/http.rb:1046:in request' /usr/local/lib/ruby/1.8/net/http.rb:840:in
post’
/usr/local/lib/ruby/1.8/soap/netHttpClient.rb:93:in post' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:116:in
start’
/usr/local/lib/ruby/1.8/net/http.rb:545:in start' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:115:in
start’
/usr/local/lib/ruby/1.8/soap/netHttpClient.rb:92:in post' /usr/local/lib/ruby/1.8/soap/streamHandler.rb:170:in
send_post’
/usr/local/lib/ruby/1.8/soap/streamHandler.rb:109:in send' /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:170:in
route’
/usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:141:in call' /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:178:in
call’
/usr/local/lib/ruby/1.8/soap/rpc/driver.rb:232:in validate' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/soap_client.rb:61:in
perform_invocation’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/base.rb:15:in
method_missing' /app/controllers/users_controller.rb:60:in
validate’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in
measure’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
perform_action’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in
process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in each_cgi' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in
each_cgi’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
process!’
/Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24
Rendering
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/templates/rescues/layout.rhtml
(500 Internal Error)
Processing AuthController#api (for 127.0.0.1 at 2006-05-24 22:25:02)
[POST]
Session ID: 6615e9cda1cbf643ac216968825c39b7
Parameters: {“<?xml version"=>"\"1.0\" encoding=\"utf-8\"
?>\n<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema\”\n
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/\“\n
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance\”>\n env:Body\n
<n1:Validate
xmlns:n1="urn:ActionWebService"\n env:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/\“>\n <username
xsi:type="xsd:string">testuser\n <password
xsi:type="xsd:string">testpass\n </n1:Validate>\n
</env:Body>\n</env:Envelope>”, “action”=>“api”, “controller”=>“auth”}
User Load (0.001179) SELECT * FROM users WHERE (username =
‘testuser’
AND passwd =‘206c80413b9a96c1312cc346b7d2517b84463edd’) LIMIT 1
Web Service Request: Validate(username=>“testuser”,
password=>“testpass”)
Entrypoint: api
<env:Envelope xmlns:xsd=“XML Schema”
xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
env:Body
<n1:Validate xmlns:n1=“urn:ActionWebService”
env:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
testuser
testpass
</n1:Validate>
</env:Body>
</env:Envelope>
Web Service Response (0.576654): => false
<?xml version="1.0" encoding="UTF-8" ?><env:Envelope xmlns:xsd=“XML Schema”
xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
env:Body
<n1:ValidateResponse xmlns:n1=“urn:ActionWebService”
env:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
false
</n1:ValidateResponse>
</env:Body>
</env:Envelope>
Sending data
Completed in 0.58673 (1 reqs/sec) | Rendering: 0.00014 (0%) | DB:
0.00118(0%) | 200 OK [
http://localhost/auth/api]