Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • soap/mapping/registry.rb
  • soap/marshal.rb

Class/Module Index [+]

Quicksearch

SOAP::Mapping::Registry

Attributes

default_factory[RW]
excn_handler_obj2soap[RW]
excn_handler_soap2obj[RW]

Public Class Methods

new(config = {}) click to toggle source
 
               # File soap/mapping/registry.rb, line 392
def initialize(config = {})
  @config = config
  @map = Map.new(self)
  if @config[:allow_original_mapping]
    @allow_original_mapping = true
    @map.init(RubyOriginalMap)
  else
    @allow_original_mapping = false
    @map.init(SOAPBaseMap)
  end
  @allow_untyped_struct = @config.key?(:allow_untyped_struct) ?
    @config[:allow_untyped_struct] : true
  @rubytype_factory = RubytypeFactory.new(
    :allow_untyped_struct => @allow_untyped_struct,
    :allow_original_mapping => @allow_original_mapping
  )
  @default_factory = @rubytype_factory
  @excn_handler_obj2soap = nil
  @excn_handler_soap2obj = nil
end
            

Public Instance Methods

add(obj_class, soap_class, factory, info = nil) click to toggle source
 
               # File soap/mapping/registry.rb, line 413
def add(obj_class, soap_class, factory, info = nil)
  @map.add(obj_class, soap_class, factory, info)
end
            
Also aliased as: set
find_mapped_obj_class(soap_class) click to toggle source
 
               # File soap/mapping/registry.rb, line 440
def find_mapped_obj_class(soap_class)
  @map.find_mapped_obj_class(soap_class)
end
            
find_mapped_soap_class(obj_class) click to toggle source
 
               # File soap/mapping/registry.rb, line 436
def find_mapped_soap_class(obj_class)
  @map.find_mapped_soap_class(obj_class)
end
            
obj2soap(obj, type_qname = nil) click to toggle source

general Registry ignores type_qname

 
               # File soap/mapping/registry.rb, line 419
def obj2soap(obj, type_qname = nil)
  soap = _obj2soap(obj)
  if @allow_original_mapping
    addextend2soap(soap, obj)
  end
  soap
end
            
set(obj_class, soap_class, factory, info = nil) click to toggle source
Alias for: add
soap2obj(node, klass = nil) click to toggle source
 
               # File soap/mapping/registry.rb, line 427
def soap2obj(node, klass = nil)
  obj = _soap2obj(node, klass)
  if @allow_original_mapping
    addextend2obj(obj, node.extraattr[RubyExtendName])
    addiv2obj(obj, node.extraattr[RubyIVarName])
  end
  obj
end