Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/sample/basic/helloworld/server.rb

Revision 1845, 412 bytes (checked in by nahi, 2 years ago)
  • added howto/as_xml sample
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 require 'soap/rpc/standaloneServer'
2
3 class HelloWorldServer < SOAP::RPC::StandaloneServer
4   def on_init
5     @log.level = Logger::Severity::DEBUG
6     add_method(self, 'hello_world', 'from')
7   end
8
9   def hello_world(from)
10     "Hello World, from #{ from }"
11   end
12 end
13
14 if $0 == __FILE__
15   server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', 2000)
16   trap(:INT) do
17     server.shutdown
18   end
19   server.start
20 end
Note: See TracBrowser for help on using the browser.