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

root/branches/1_5/sample/howto/base64/server.rb

Revision 1843, 511 bytes (checked in by nahi, 2 years ago)
  • reorganize sampless
Line 
1 #!/usr/bin/env ruby
2
3 require 'soap/rpc/standaloneServer'
4
5 class Server < SOAP::RPC::StandaloneServer
6   def initialize(*arg)
7     super
8     add_rpc_method(self, 'echo', 'arg')
9     add_rpc_method(self, 'echo_base64', 'arg')
10   end
11
12   def echo(arg)
13     p arg
14     arg
15   end
16
17   def echo_base64(arg)
18     p arg
19     SOAP::SOAPBase64.new(arg)
20   end
21 end
22
23 if $0 == __FILE__
24   server = Server.new('Server', 'http://tempuri.org/base64Service',
25     '0.0.0.0', 7000)
26   trap(:INT) do
27     server.shutdown
28   end
29   server.start
30 end
Note: See TracBrowser for help on using the browser.