Class SOAP::RPC::HTTPServer
In: soap/rpc/httpserver.rb
Parent: Logger::Application

Methods

Attributes

default_namespace  [RW] 
server  [R] 

Public Class methods

[Source]

# File soap/rpc/httpserver.rb, line 23
  def initialize(config)
    super(config[:SOAPHTTPServerApplicationName] || self.class.name)
    @default_namespace = config[:SOAPDefaultNamespace]
    @webrick_config = config.dup
    @webrick_config[:Logger] ||= @log
    @server = nil
    @soaplet = ::SOAP::RPC::SOAPlet.new
    self.level = Logger::Severity::INFO
    on_init
  end

Public Instance methods

[Source]

# File soap/rpc/httpserver.rb, line 75
  def add_method(obj, name, *param)
    add_method_as(obj, name, name, *param)
  end

[Source]

# File soap/rpc/httpserver.rb, line 79
  def add_method_as(obj, name, name_as, *param)
    qname = XSD::QName.new(@default_namespace, name_as)
    soapaction = nil
    method = obj.method(name)
    param_def = if param.size == 1 and param[0].is_a?(Array)
        param[0]
      elsif param.empty?
        ::SOAP::RPC::SOAPMethod.create_param_def(
          (1..method.arity.abs).collect { |i| "p#{ i }" })
      else
        SOAP::RPC::SOAPMethod.create_param_def(param)
      end
    @soaplet.app_scope_router.add_method(obj, qname, soapaction, name, param_def)
  end

[Source]

# File soap/rpc/httpserver.rb, line 71
  def add_rpc_headerhandler(obj)
    @soaplet.add_rpc_headerhandler(obj)
  end

[Source]

# File soap/rpc/httpserver.rb, line 67
  def add_rpc_request_headerhandler(factory)
    @soaplet.add_rpc_request_headerhandler(factory)
  end

[Source]

# File soap/rpc/httpserver.rb, line 58
  def add_rpc_request_servant(factory, namespace = @default_namespace,
      mapping_registry = nil)
    @soaplet.add_rpc_request_servant(factory, namespace, mapping_registry)
  end

[Source]

# File soap/rpc/httpserver.rb, line 63
  def add_rpc_servant(obj, namespace = @default_namespace)
    @soaplet.add_rpc_servant(obj, namespace)
  end

[Source]

# File soap/rpc/httpserver.rb, line 50
  def mapping_registry
    @soaplet.app_scope_router.mapping_registry
  end

[Source]

# File soap/rpc/httpserver.rb, line 54
  def mapping_registry=(mapping_registry)
    @soaplet.app_scope_router.mapping_registry = mapping_registry
  end

[Source]

# File soap/rpc/httpserver.rb, line 34
  def on_init
    # define extra methods in derived class.

  end

[Source]

# File soap/rpc/httpserver.rb, line 46
  def shutdown
    @server.shutdown if @server
  end

[Source]

# File soap/rpc/httpserver.rb, line 38
  def status
    if @server
      @server.status
    else
      nil
    end
  end

[Validate]