lib/savon/soap/xml.rb in savon-0.8.6 vs lib/savon/soap/xml.rb in savon-0.9.0
- old
+ new
@@ -26,11 +26,11 @@
value.find_soap_body
end
# Converts a given SOAP response +xml+ to a Hash.
def self.parse(xml)
- Crack::XML.parse(xml) rescue {}
+ Crack::XML.parse(xml)
end
# Expects a SOAP response XML or Hash, traverses it for a given +path+ of Hash keys
# and returns the value as an Array. Defaults to return an empty Array in case the
# path does not exist or returns nil.
@@ -78,13 +78,13 @@
end
# Sets the SOAP envelope namespace.
attr_writer :env_namespace
- # Returns the SOAP envelope namespace. Defaults to :env.
+ # Returns the SOAP envelope namespace. Uses the global namespace if set Defaults to :env.
def env_namespace
- @env_namespace ||= :env
+ @env_namespace ||= Savon.env_namespace.nil? ? :env : Savon.env_namespace
end
# Sets the +namespaces+ Hash.
attr_writer :namespaces
@@ -179,5 +179,6 @@
end
end
end
end
+