diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-14 15:14:02 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-14 15:14:02 +0000 |
commit | 9cba39a1a1b09f94a5d890e0ad6f4c74bb9f36bf (patch) | |
tree | 559f6780e94880fc3e7c37678fbe8b49ff0556d7 /lib/soap/element.rb | |
parent | 0b841783b508c9bddb1c0117b1970fc7c350843b (diff) | |
download | ruby-9cba39a1a1b09f94a5d890e0ad6f4c74bb9f36bf.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@4760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap/element.rb')
-rw-r--r-- | lib/soap/element.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/soap/element.rb b/lib/soap/element.rb index 640eafb0e4..561cb1b071 100644 --- a/lib/soap/element.rb +++ b/lib/soap/element.rb @@ -84,17 +84,17 @@ public end end - def encode(buf, ns, attrs = {}, indent = '') + def encode(generator, ns, attrs = {}) SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace) SOAPGenerator.assign_ns(attrs, ns, EncodingNamespace) attrs[ns.name(AttrEncodingStyleName)] = EncodingNamespace name = ns.name(@elename) - SOAPGenerator.encode_tag(buf, name, attrs, indent) + generator.encode_tag(name, attrs) yield(self.faultcode, false) yield(self.faultstring, false) yield(self.faultactor, false) yield(self.detail, false) if self.detail - SOAPGenerator.encode_tag_end(buf, name, indent, true) + generator.encode_tag_end(name, true) end end @@ -112,9 +112,9 @@ public @is_fault = is_fault end - def encode(buf, ns, attrs = {}, indent = '') + def encode(generator, ns, attrs = {}) name = ns.name(@elename) - SOAPGenerator.encode_tag(buf, name, attrs, indent) + generator.encode_tag(name, attrs) if @is_fault yield(@data, true) else @@ -122,7 +122,7 @@ public yield(data, true) end end - SOAPGenerator.encode_tag_end(buf, name, indent, true) + generator.encode_tag_end(name, true) end def root_node @@ -160,7 +160,7 @@ public @encodingstyle = encodingstyle || LiteralNamespace end - def encode(buf, ns, attrs = {}, indent = '') + def encode(generator, ns, attrs = {}) attrs.each do |key, value| @content.attr[key] = value end @@ -185,13 +185,13 @@ class SOAPHeader < SOAPArray @encodingstyle = nil end - def encode(buf, ns, attrs = {}, indent = '') + def encode(generator, ns, attrs = {}) name = ns.name(@elename) - SOAPGenerator.encode_tag(buf, name, attrs, indent) + generator.encode_tag(name, attrs) @data.each do |data| yield(data, true) end - SOAPGenerator.encode_tag_end(buf, name, indent, true) + generator.encode_tag_end(name, true) end def length @@ -215,16 +215,16 @@ class SOAPEnvelope < XSD::NSDBase @body = body end - def encode(buf, ns, attrs = {}, indent = '') + def encode(generator, ns, attrs = {}) SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace, SOAPNamespaceTag) name = ns.name(@elename) - SOAPGenerator.encode_tag(buf, name, attrs, indent) + generator.encode_tag(name, attrs) yield(@header, true) if @header and @header.length > 0 yield(@body, true) - SOAPGenerator.encode_tag_end(buf, name, indent, true) + generator.encode_tag_end(name, true) end end |