summaryrefslogtreecommitdiffstats
path: root/lib/soap/encodingstyle/aspDotNetHandler.rb
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-14 15:14:02 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-14 15:14:02 +0000
commit7797cbbe3dfd5be7ca7ff33b0c69a04f941243d1 (patch)
tree559f6780e94880fc3e7c37678fbe8b49ff0556d7 /lib/soap/encodingstyle/aspDotNetHandler.rb
parent7767638d90e56f7d9b7355bc485ca26da64dfe7b (diff)
downloadruby-7797cbbe3dfd5be7ca7ff33b0c69a04f941243d1.tar.gz
ruby-7797cbbe3dfd5be7ca7ff33b0c69a04f941243d1.tar.xz
ruby-7797cbbe3dfd5be7ca7ff33b0c69a04f941243d1.zip
* lib/soap/baseData.rb: Introduce SOAPType as the common ancestor of
SOAPBasetype and SOAPCompoundtype. * lib/soap/generator.rb, lib/soap/element.rb, lib/soap/encodingstyle/*: Encoding methods signature change. Pass SOAPGenerator as a parameter. * lib/soap/mapping/*, test/soap/marshal/test_marshal.rb: Refactoring for better marshalling/unmarshalling support. Now I think SOAP marshaller supports all kind of object graph which is supported by Ruby's original marshaller. Of course there could be bugs as always. Find it. :-) * lib/soap/rpc/standaloneServer.rb: Set severity threshould to INFO. DEBUG is too noisy. * lib/xsd/datatypes.rb: DateTime#of is obsoleted. Use DateTime#offset. * test/wsdl/emptycomplextype.wsdl, test/xsd/xmlschema.xml: Avoid useless warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap/encodingstyle/aspDotNetHandler.rb')
-rw-r--r--lib/soap/encodingstyle/aspDotNetHandler.rb23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/soap/encodingstyle/aspDotNetHandler.rb b/lib/soap/encodingstyle/aspDotNetHandler.rb
index fdce42a48..b00084e3a 100644
--- a/lib/soap/encodingstyle/aspDotNetHandler.rb
+++ b/lib/soap/encodingstyle/aspDotNetHandler.rb
@@ -38,7 +38,7 @@ class ASPDotNetHandler < Handler
###
## encode interface.
#
- def encode_data(buf, ns, qualified, data, parent, indent = '')
+ def encode_data(generator, ns, qualified, data, parent)
attrs = {}
name = if qualified and data.elename.namespace
SOAPGenerator.assign_ns(attrs, ns, data.elename.namespace)
@@ -49,17 +49,16 @@ class ASPDotNetHandler < Handler
case data
when SOAPRawString
- SOAPGenerator.encode_tag(buf, name, attrs, indent)
- buf << data.to_s
+ generator.encode_tag(name, attrs)
+ generator.encode_rawstring(data.to_s)
when XSD::XSDString
- SOAPGenerator.encode_tag(buf, name, attrs, indent)
- buf << SOAPGenerator.encode_str(@charset ?
- XSD::Charset.encoding_to_xml(data.to_s, @charset) : data.to_s)
+ generator.encode_tag(name, attrs)
+ generator.encode_string(@charset ? XSD::Charset.encoding_to_xml(data.to_s, @charset) : data.to_s)
when XSD::XSDAnySimpleType
- SOAPGenerator.encode_tag(buf, name, attrs, indent)
- buf << SOAPGenerator.encode_str(data.to_s)
+ generator.encode_tag(name, attrs)
+ generator.encode_string(data.to_s)
when SOAPStruct
- SOAPGenerator.encode_tag(buf, name, attrs, indent)
+ generator.encode_tag(name, attrs)
data.each do |key, value|
if !value.elename.namespace
value.elename.namespace = data.elename.namespace
@@ -67,7 +66,7 @@ class ASPDotNetHandler < Handler
yield(value, true)
end
when SOAPArray
- SOAPGenerator.encode_tag(buf, name, attrs, indent)
+ generator.encode_tag(name, attrs)
data.traverse do |child, *rank|
data.position = nil
yield(child, true)
@@ -78,14 +77,14 @@ yle.")
end
end
- def encode_data_end(buf, ns, qualified, data, parent, indent = "")
+ def encode_data_end(generator, ns, qualified, data, parent)
name = if qualified and data.elename.namespace
ns.name(data.elename)
else
data.elename.name
end
cr = data.is_a?(SOAPCompoundtype)
- SOAPGenerator.encode_tag_end(buf, name, indent, cr)
+ generator.encode_tag_end(name, cr)
end