|
Revision 1843, 391 bytes
(checked in by nahi, 2 years ago)
|
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
author date id revision
|
| Line | |
|---|
| 1 |
#!/usr/bin/env ruby |
|---|
| 2 |
|
|---|
| 3 |
require 'soap/rpc/standaloneServer' |
|---|
| 4 |
require 'calc' |
|---|
| 5 |
|
|---|
| 6 |
class CalcServer < SOAP::RPC::StandaloneServer |
|---|
| 7 |
def initialize(*arg) |
|---|
| 8 |
super |
|---|
| 9 |
|
|---|
| 10 |
servant = CalcService |
|---|
| 11 |
add_servant(servant, 'http://tempuri.org/calcService') |
|---|
| 12 |
end |
|---|
| 13 |
end |
|---|
| 14 |
|
|---|
| 15 |
if $0 == __FILE__ |
|---|
| 16 |
server = CalcServer.new('CalcServer', nil, '0.0.0.0', 7000) |
|---|
| 17 |
trap(:INT) do |
|---|
| 18 |
server.shutdown |
|---|
| 19 |
end |
|---|
| 20 |
server.start |
|---|
| 21 |
end |
|---|