method
any2soap

v1_8_7_72 -
Show latest stable
-
0 notes -
Class: SOAP::Mapping::WSDLLiteralRegistry
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
any2soap(obj, qname)
private
Hide source
# File lib/soap/mapping/wsdlliteralregistry.rb, line 148 def any2soap(obj, qname) if obj.is_a?(SOAPElement) obj elsif obj.class.class_variables.include?('@@schema_element') stubobj2soap(obj, qname) elsif obj.is_a?(SOAP::Mapping::Object) mappingobj2soap(obj, qname) elsif obj.is_a?(Hash) ele = SOAPElement.from_obj(obj) ele.elename = qname ele else # expected to be a basetype or an anyType. # SOAPStruct, etc. is used instead of SOAPElement. begin ele = Mapping.obj2soap(obj, nil, nil, MAPPING_OPT) ele.elename = qname ele rescue MappingError ele = SOAPElement.new(qname, obj.to_s) end if obj.respond_to?(:__xmlattr) obj.__xmlattr.each do |key, value| ele.extraattr[key] = value end end ele end end