Class: WSDL::Response::FaultParser Private
- Inherits:
-
Object
- Object
- WSDL::Response::FaultParser
- Defined in:
- lib/wsdl/response/fault_parser.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Parses SOAP fault elements from a response document.
Handles both SOAP 1.1 and 1.2 fault structures, producing a normalized Fault data object.
Class Method Summary collapse
-
.parse(doc) ⇒ Fault?
private
Parses a SOAP fault from the given XML document.
Instance Method Summary collapse
-
#initialize(doc) ⇒ FaultParser
constructor
private
A new instance of FaultParser.
-
#parse ⇒ Fault?
private
The parsed fault, or nil if no fault is present.
Constructor Details
#initialize(doc) ⇒ FaultParser
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FaultParser.
25 26 27 |
# File 'lib/wsdl/response/fault_parser.rb', line 25 def initialize(doc) @doc = doc end |
Class Method Details
.parse(doc) ⇒ Fault?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parses a SOAP fault from the given XML document.
20 21 22 |
# File 'lib/wsdl/response/fault_parser.rb', line 20 def self.parse(doc) new(doc).parse end |
Instance Method Details
#parse ⇒ Fault?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the parsed fault, or nil if no fault is present.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/wsdl/response/fault_parser.rb', line 30 def parse node = fault_node return unless node if node.namespace&.href == NS::SOAP_1_2 parse_soap_1_2_fault(node) else parse_soap_1_1_fault(node) end end |