1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/soap/mapping/{factory.rb,registry.rb}: fixed illegal mapped URI

object with soap/marshal.
          added URIFactory class for URI mapping.  BasetypeFactory checks
          instance_variables when original mapping is not allowed (ivar must
          be empty).  Instance of URI have instance_variables but it must be
          llowed whenever original mapping is allowed or not.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2004-04-01 10:58:17 +00:00
parent 9db6fb5ce5
commit b37f4923e5
3 changed files with 26 additions and 2 deletions

View file

@ -1,3 +1,12 @@
Thu Apr 1 19:58:37 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* lib/soap/mapping/{factory.rb,registry.rb}: fixed illegal mapped URI
object with soap/marshal.
added URIFactory class for URI mapping. BasetypeFactory checks
instance_variables when original mapping is not allowed (ivar must
be empty). Instance of URI have instance_variables but it must be
llowed whenever original mapping is allowed or not.
Wed Mar 31 19:06:23 2004 Tanaka Akira <akr@m17n.org>
* time.c (year_leap_p): new function.

View file

@ -220,6 +220,20 @@ class Base64Factory_ < Factory
end
end
class URIFactory_ < Factory
def obj2soap(soap_class, obj, info, map)
soap_obj = soap_class.new(obj)
mark_marshalled_obj(obj, soap_obj) if soap_obj
soap_obj
end
def soap2obj(obj_class, node, info, map)
obj = node.data
mark_unmarshalled_obj(node, obj)
return true, obj
end
end
class ArrayFactory_ < Factory
def initialize(allow_original_mapping = false)
super()

View file

@ -186,6 +186,7 @@ class Registry
DateTimeFactory = DateTimeFactory_.new
ArrayFactory = ArrayFactory_.new
Base64Factory = Base64Factory_.new
URIFactory = URIFactory_.new
TypedArrayFactory = TypedArrayFactory_.new
TypedStructFactory = TypedStructFactory_.new
@ -213,7 +214,7 @@ class Registry
{:derived_class => true}],
[::Integer, ::SOAP::SOAPShort, BasetypeFactory,
{:derived_class => true}],
[::URI::Generic, ::SOAP::SOAPAnyURI, BasetypeFactory,
[::URI::Generic, ::SOAP::SOAPAnyURI, URIFactory,
{:derived_class => true}],
[::String, ::SOAP::SOAPBase64, Base64Factory],
[::String, ::SOAP::SOAPHexBinary, Base64Factory],
@ -259,7 +260,7 @@ class Registry
{:derived_class => true}],
[::Integer, ::SOAP::SOAPShort, BasetypeFactory,
{:derived_class => true}],
[::URI::Generic, ::SOAP::SOAPAnyURI, BasetypeFactory,
[::URI::Generic, ::SOAP::SOAPAnyURI, URIFactory,
{:derived_class => true}],
[::String, ::SOAP::SOAPBase64, Base64Factory],
[::String, ::SOAP::SOAPHexBinary, Base64Factory],