diff options
Diffstat (limited to 'lib/soap/marshal.rb')
-rw-r--r-- | lib/soap/marshal.rb | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/lib/soap/marshal.rb b/lib/soap/marshal.rb index 5c25fad0de..910ab24527 100644 --- a/lib/soap/marshal.rb +++ b/lib/soap/marshal.rb @@ -1,25 +1,9 @@ -=begin -SOAP4R - Marshalling/Unmarshalling Ruby's object using SOAP Encoding. -Copyright (C) 2001, 2003 NAKAMURA, Hiroshi. +# SOAP4R - Marshalling/Unmarshalling Ruby's object using SOAP Encoding. +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end - - -# The original version of the marshal.rb to marshal/unmarshal Ruby's object -# using SOAP Encoding was written by Michael Neumann. His valuable comments -# and his program inspired me to write this. Thanks. +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require "soap/mapping" @@ -58,7 +42,9 @@ module Marshal def unmarshal(stream, mapping_registry = MarshalMappingRegistry) header, body = SOAP::Processor.unmarshal(stream) - #Mapping.soap2obj(body.root_node, mapping_registry) + if body.nil? + raise ArgumentError.new("Illegal SOAP marshal format.") + end Mapping.soap2obj(body.root_node, mapping_registry) end end |