SOAP::RPC::CGIStub (Class)

In: soap/rpc/cgistub.rb
Parent: Logger::Application

SYNOPSIS

  CGIStub.new

DESCRIPTION

  To be written...

Attributes

mediatype  [RW]  There is a client which does not accept the media-type which is defined in SOAP spec.

Included Modules

Public Class methods

[Source]

# File soap/rpc/cgistub.rb, line 85
  def initialize(appname, default_namespace)
    super(appname)
    set_log(STDERR)
    self.level = ERROR
    @default_namespace = default_namespace
    @router = SOAP::RPC::Router.new(appname)
    @remote_user = ENV['REMOTE_USER'] || 'anonymous'
    @remote_host = ENV['REMOTE_HOST'] || ENV['REMOTE_ADDR'] || 'unknown'
    @request = nil
    @response = nil
    @mediatype = MediaType
    on_init
  end

Public Instance methods

[Source]

# File soap/rpc/cgistub.rb, line 121
  def add_method(receiver, name, *param)
    add_method_with_namespace_as(@default_namespace, receiver,
      name, name, *param)
  end

[Source]

# File soap/rpc/cgistub.rb, line 126
  def add_method_as(receiver, name, name_as, *param)
    add_method_with_namespace_as(@default_namespace, receiver,
      name, name_as, *param)
  end

[Source]

# File soap/rpc/cgistub.rb, line 131
  def add_method_with_namespace(namespace, receiver, name, *param)
    add_method_with_namespace_as(namespace, receiver, name, name, *param)
  end

[Source]

# File soap/rpc/cgistub.rb, line 135
  def add_method_with_namespace_as(namespace, receiver, name, name_as, *param)
    param_def = if param.size == 1 and param[0].is_a?(Array)
        param[0]
      else
        SOAP::RPC::SOAPMethod.create_param_def(param)
      end
    qname = XSD::QName.new(namespace, name_as)
    @router.add_method(receiver, qname, nil, name, param_def)
  end

[Source]

# File soap/rpc/cgistub.rb, line 99
  def add_servant(obj, namespace = @default_namespace, soapaction = nil)
    RPC.defined_methods(obj).each do |name|
      qname = XSD::QName.new(namespace, name)
      param_size = obj.method(name).arity.abs
      params = (1..param_size).collect { |i| "p#{ i }" }
      param_def = SOAP::RPC::SOAPMethod.create_param_def(params)
      @router.add_method(obj, qname, soapaction, name, param_def)
    end
  end

[Source]

# File soap/rpc/cgistub.rb, line 149
  def create_fault_response(e)
    @router.create_fault_response(e)
  end

[Source]

# File soap/rpc/cgistub.rb, line 113
  def mapping_registry
    @router.mapping_registry
  end

[Source]

# File soap/rpc/cgistub.rb, line 117
  def mapping_registry=(value)
    @router.mapping_registry = value
  end

[Source]

# File soap/rpc/cgistub.rb, line 109
  def on_init
    # Override this method in derived class to call 'add_method' to add methods.

  end

[Source]

# File soap/rpc/cgistub.rb, line 145
  def route(request_string, charset)
    @router.route(request_string, charset)
  end

[Validate]