diff options
Diffstat (limited to 'sample/soap/exchange')
-rw-r--r-- | sample/soap/exchange/client.rb | 19 | ||||
-rw-r--r-- | sample/soap/exchange/exchange.rb | 17 | ||||
-rw-r--r-- | sample/soap/exchange/httpd.rb | 20 | ||||
-rw-r--r-- | sample/soap/exchange/samplehttpd.conf | 2 | ||||
-rw-r--r-- | sample/soap/exchange/server.cgi | 14 | ||||
-rw-r--r-- | sample/soap/exchange/server.rb | 16 |
6 files changed, 0 insertions, 88 deletions
diff --git a/sample/soap/exchange/client.rb b/sample/soap/exchange/client.rb deleted file mode 100644 index 2aa277afef..0000000000 --- a/sample/soap/exchange/client.rb +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env ruby - -require "soap/rpc/driver" - -ExchangeServiceNamespace = 'http://tempuri.org/exchangeService' - -server = ARGV.shift || "http://localhost:7000/" -# server = "http://localhost:8808/server.cgi" - -logger = nil -wiredump_dev = nil -# logger = Logger.new(STDERR) -# wiredump_dev = STDERR - -drv = SOAP::RPC::Driver.new(server, ExchangeServiceNamespace) -drv.wiredump_dev = wiredump_dev -drv.add_method("rate", "country1", "country2") - -p drv.rate("USA", "Japan") diff --git a/sample/soap/exchange/exchange.rb b/sample/soap/exchange/exchange.rb deleted file mode 100644 index 00f930deb8..0000000000 --- a/sample/soap/exchange/exchange.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'soap/rpc/driver' - -ExchangeServiceNamespace = 'http://tempuri.org/exchangeService' - -class Exchange - ForeignServer = "http://services.xmethods.net/soap" - Namespace = "urn:xmethods-CurrencyExchange" - - def initialize - @drv = SOAP::RPC::Driver.new(ForeignServer, Namespace) - @drv.add_method("getRate", "country1", "country2") - end - - def rate(country1, country2) - return @drv.getRate(country1, country2) - end -end diff --git a/sample/soap/exchange/httpd.rb b/sample/soap/exchange/httpd.rb deleted file mode 100644 index bebcff96c6..0000000000 --- a/sample/soap/exchange/httpd.rb +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby - -require 'webrick' -require 'soap/property' - -docroot = "." -port = 8808 -if opt = SOAP::Property.loadproperty("samplehttpd.conf") - docroot = opt["docroot"] - port = Integer(opt["port"]) -end - -s = WEBrick::HTTPServer.new( - :BindAddress => "0.0.0.0", - :Port => port, - :DocumentRoot => docroot, - :CGIPathEnv => ENV['PATH'] -) -trap(:INT){ s.shutdown } -s.start diff --git a/sample/soap/exchange/samplehttpd.conf b/sample/soap/exchange/samplehttpd.conf deleted file mode 100644 index 85e9995021..0000000000 --- a/sample/soap/exchange/samplehttpd.conf +++ /dev/null @@ -1,2 +0,0 @@ -docroot = . -port = 8808 diff --git a/sample/soap/exchange/server.cgi b/sample/soap/exchange/server.cgi deleted file mode 100644 index 16bc85a042..0000000000 --- a/sample/soap/exchange/server.cgi +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/local/bin/ruby - -require 'soap/rpc/cgistub' -require 'exchange' - -class ExchangeServer < SOAP::RPC::CGIStub - def initialize(*arg) - super - servant = Exchange.new - add_servant(servant) - end -end - -status = ExchangeServer.new('SampleStructServer', ExchangeServiceNamespace).start diff --git a/sample/soap/exchange/server.rb b/sample/soap/exchange/server.rb deleted file mode 100644 index d510d54a76..0000000000 --- a/sample/soap/exchange/server.rb +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -require 'soap/rpc/standaloneServer' -require 'exchange' - -class ExchangeServer < SOAP::RPC::StandaloneServer - def initialize(*arg) - super - servant = Exchange.new - add_servant(servant) - end -end - -if $0 == __FILE__ - status = ExchangeServer.new('SampleStructServer', ExchangeServiceNamespace, '0.0.0.0', 7000).start -end |