summaryrefslogtreecommitdiff
path: root/lib/soap/rpc/element.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/soap/rpc/element.rb')
-rw-r--r--lib/soap/rpc/element.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/soap/rpc/element.rb b/lib/soap/rpc/element.rb
index e6cae2f7e0..c224b03d0d 100644
--- a/lib/soap/rpc/element.rb
+++ b/lib/soap/rpc/element.rb
@@ -20,21 +20,25 @@ class SOAPBody < SOAPStruct
end
def response
+ root = root_node
if !@is_fault
- if void?
+ if root.nil?
nil
+ elsif root.is_a?(SOAPBasetype)
+ root
else
# Initial element is [retval].
- root_node[0]
+ root[0]
end
else
- root_node
+ root
end
end
def outparams
- if !@is_fault and !void?
- op = root_node[1..-1]
+ root = root_node
+ if !@is_fault and !root.nil? and !root.is_a?(SOAPBasetype)
+ op = root[1..-1]
op = nil if op && op.empty?
op
else
@@ -42,10 +46,6 @@ class SOAPBody < SOAPStruct
end
end
- def void?
- root_node.nil?
- end
-
def fault
if @is_fault
self['fault']