# 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
# 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
# File soap/mapping/registry.rb, line 440
def find_mapped_obj_class(soap_class)
@map.find_mapped_obj_class(soap_class)
end
# File soap/mapping/registry.rb, line 436
def find_mapped_soap_class(obj_class)
@map.find_mapped_soap_class(obj_class)
end
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
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.