Sha256: 776c0a042043614a70a8a7f464a143f19ca54ef698c2678e264b90d38d3cc53b

Contents?: true

Size: 632 Bytes

Versions: 7

Compression:

Stored size: 632 Bytes

Contents

#!/usr/bin/env ruby

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

class CookieCalcServer < SOAP::RPC::StandaloneServer
  def on_init
    servant = CookieCalcService.new
    add_method(servant, 'set', 'newValue')
    add_method(servant, 'get')
    add_method_as(servant, '+', 'add', 'lhs')
    add_method_as(servant, '-', 'sub', 'lhs')
    add_method_as(servant, '*', 'multi', 'lhs')
    add_method_as(servant, '/', 'div', 'lhs')
  end
end

if $0 == __FILE__
  server = CookieCalcServer.new('CalcServer', 'http://tempuri.org/calcService', '0.0.0.0', 7000)
  trap(:INT) do
    server.shutdown
  end
  status = server.start
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
soap4r-spox-1.6.0 sample/payload/cookies/server.rb
soap4r-ruby1.9-2.0.5 sample/payload/cookies/server.rb
soap4r-ruby1.9-2.0.3 sample/payload/cookies/server.rb
soap4r-ruby1.9-2.0.2 sample/payload/cookies/server.rb
soap4r-ruby1.9-2.0.1 sample/payload/cookies/server.rb
soap4r-ruby1.9-2.0.0 sample/payload/cookies/server.rb
soap4r-ruby1.9-1.0.0 sample/payload/cookies/server.rb