Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended 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 Class 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