summaryrefslogtreecommitdiff
path: root/sample/soap/calc/server.rb
blob: 12a3968b5a732e2a8610d0fb8c4123fb95cdf19b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby

require 'soap/rpc/standaloneServer'
require 'calc'

class CalcServer < SOAP::RPC::StandaloneServer
  def initialize(*arg)
    super

    servant = CalcService
    add_servant(servant, 'http://tempuri.org/calcService')
  end
end

if $0 == __FILE__
  status = CalcServer.new('CalcServer', nil, '0.0.0.0', 7000).start
end