source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/soap/rpc/standaloneServer.rb@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 931 bytes
Line 
1# SOAP4R - WEBrick Server
2# Copyright (C) 2003 by NAKAMURA, Hiroshi <[email protected]>.
3
4# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5# redistribute it and/or modify it under the same terms of Ruby's license;
6# either the dual license version in 2003, or any later version.
7
8
9require 'soap/rpc/httpserver'
10
11
12module SOAP
13module RPC
14
15
16class StandaloneServer < HTTPServer
17 def initialize(appname, default_namespace, host = "0.0.0.0", port = 8080)
18 @appname = appname
19 @default_namespace = default_namespace
20 @host = host
21 @port = port
22 super(create_config)
23 end
24
25 alias add_servant add_rpc_servant
26 alias add_headerhandler add_rpc_headerhandler
27
28private
29
30 def create_config
31 {
32 :BindAddress => @host,
33 :Port => @port,
34 :AccessLog => [],
35 :SOAPDefaultNamespace => @default_namespace,
36 :SOAPHTTPServerApplicationName => @appname,
37 }
38 end
39end
40
41
42end
43end
Note: See TracBrowser for help on using the repository browser.