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

In Files

  • soap/marshal.rb

Class/Module Index [+]

Quicksearch

SOAP::Marshal

Constants

MarshalMappingRegistry

Trying xsd:dateTime data to be recovered as aTime.

Public Instance Methods

dump(obj, io = nil) click to toggle source
 
               # File soap/marshal.rb, line 28
def dump(obj, io = nil)
  marshal(obj, MarshalMappingRegistry, io)
end
            
load(stream) click to toggle source
 
               # File soap/marshal.rb, line 32
def load(stream)
  unmarshal(stream, MarshalMappingRegistry)
end
            
marshal(obj, mapping_registry = MarshalMappingRegistry, io = nil) click to toggle source
 
               # File soap/marshal.rb, line 36
def marshal(obj, mapping_registry = MarshalMappingRegistry, io = nil)
  elename = Mapping.name2elename(obj.class.to_s)
  soap_obj = Mapping.obj2soap(obj, mapping_registry)
  body = SOAPBody.new
  body.add(elename, soap_obj)
  env = SOAPEnvelope.new(nil, body)
  SOAP::Processor.marshal(env, {}, io)
end
            
unmarshal(stream, mapping_registry = MarshalMappingRegistry) click to toggle source
 
               # File soap/marshal.rb, line 45
def unmarshal(stream, mapping_registry = MarshalMappingRegistry)
  env = SOAP::Processor.unmarshal(stream)
  if env.nil?
    raise ArgumentError.new("Illegal SOAP marshal format.")
  end
  Mapping.soap2obj(env.body.root_node, mapping_registry)
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 visit Documenting-ruby.org.

blog comments powered by Disqus