method
register_type
v1.2.6 -
Show latest stable
-
0 notes -
Class: ActionWebService::Protocol::Soap::SoapMarshaler
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- What's this?
register_type(type)
public
Hide source
# File actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb, line 40 def register_type(type) return @type2binding[type] if @type2binding.has_key?(type) if type.array? array_mapping = @registry.find_mapped_soap_class(Array) qname = XSD::QName.new(@namespace, soap_type_name(type.element_type.type_class.name) + 'Array') element_type_binding = register_type(type.element_type) @type2binding[type] = SoapBinding.new(self, qname, type, array_mapping, element_type_binding) elsif (mapping = @registry.find_mapped_soap_class(type.type_class) rescue nil) qname = mapping[2] ? mapping[2][:type] : nil qname ||= soap_base_type_name(mapping[0]) @type2binding[type] = SoapBinding.new(self, qname, type, mapping) else qname = XSD::QName.new(@namespace, soap_type_name(type.type_class.name)) @registry.add(type.type_class, SOAP::SOAPStruct, typed_struct_factory(type.type_class), { :type => qname }) mapping = @registry.find_mapped_soap_class(type.type_class) @type2binding[type] = SoapBinding.new(self, qname, type, mapping) end if type.structured? type.each_member do |m_name, m_type| register_type(m_type) end end @type2binding[type] end