~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to lib/soap/rpc/standaloneServer.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# SOAP4R - WEBrick Server
2
 
# Copyright (C) 2003 by NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
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
 
 
9
 
require 'soap/rpc/httpserver'
10
 
 
11
 
 
12
 
module SOAP
13
 
module RPC
14
 
 
15
 
 
16
 
class 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
 
 
28
 
private
29
 
 
30
 
  def create_config
31
 
    {
32
 
      :BindAddress => @host,
33
 
      :Port => @port,
34
 
      :AccessLog => [],
35
 
      :SOAPDefaultNamespace => @default_namespace,
36
 
      :SOAPHTTPServerApplicationName => @appname,
37
 
    }
38
 
  end
39
 
end
40
 
 
41
 
 
42
 
end
43
 
end