Index: [Article Count Order] [Thread]

Date:  Tue, 2 Apr 2002 22:41:35 +1200
From:  Holden Glova <dsafari@xtra.co.nz>
Subject:  [webricken:84] Some sort of loop?
To:  webricken@notwork.org
Message-Id:  <20020402103603.XGMN267.mta5-rme.xtra.co.nz@there>
X-Mail-Count: 00084

Hello all,

I'm not sure at all what is going on here. Have I mucked up somewhere along 
the line? I think my webrick server is pretty standard...

#!/usr/bin/ruby

require 'webrick'
require 'getopts'

getopts nil, 'r:'

dir = File::dirname(File::expand_path(__FILE__))

s=WEBrick::HTTPServer.new(
  :Port           => 2020,
  :Logger         => WEBrick::Log::new($stderr, WEBrick::Log::DEBUG),
  :DocumentRoot   => $OPT_r || dir + "/htdocs"
)

require 'raa/soaplet'
srv = SOAP::WEBrickSOAPlet.new

require 'raa/soap/service/services'
srv.addServant('urn:raaServices-simpleFinder', RAA::Service::SimpleFinder.new)
srv.addServant('urn:raaServices-entryLibrarian', 
RAA::Service::EntryLibrarian.new)

s.mount("/soap", srv)

trap("INT"){ s.shutdown }
s.start


Any calls I make to the SimpleFinder work fine, any calls I make to the 
EntryLibrarian give me the following error on the client tool.
/usr/lib/ruby/1.6/net/protocol.rb:474:in `on_read_timeout': socket read 

timeout ( sec) (TimeoutError)
        from /usr/lib/ruby/1.6/net/protocol.rb:469:in `rbuf_fill'
        from /usr/lib/ruby/1.6/net/protocol.rb:427:in `readuntil'
        from /usr/lib/ruby/1.6/net/protocol.rb:438:in `readline'
        from /usr/lib/ruby/1.6/net/http.rb:915:in `readnew'
        from /usr/lib/ruby/1.6/net/http.rb:896:in `new_from_socket'
        from /usr/lib/ruby/1.6/net/http.rb:785:in `get_response'
        from /usr/lib/ruby/1.6/net/http.rb:739:in `exec'
        from /usr/lib/ruby/1.6/net/http.rb:446:in `__send__'
         ... 23 levels...
        from /usr/local/lib/site_ruby/1.6/webrick/server.rb:84:in `start'
        from /usr/local/lib/site_ruby/1.6/webrick/server.rb:77:in `start'
        from /usr/local/lib/site_ruby/1.6/webrick/server.rb:77:in `start'
        from ./raa_service_server.rb:29


My client code is
  def show_from_raa(package_name)
    raa = SOAP::Driver.new(nil, nil, 'urn:raaServices-entryLibrarian',       
'http://localhost:2020/soap', nil)
    raa.addMethod('lookup_entry', 'name')
    entry = raa.lookup_entry(package_name)

    entry.each do |key, value|
      puts "#{key}: #{value}"
    end
  end


Can anyone help me with my error?

-- 
Signed,
Holden Glova