Class: WSDL::Response::Fault
- Inherits:
-
Data
- Object
- Data
- WSDL::Response::Fault
- Defined in:
- lib/wsdl/response/fault.rb
Overview
Represents a parsed SOAP fault from a response.
Handles both SOAP 1.1 and 1.2 fault structures, normalizing them into a consistent interface.
SOAP 1.1 structure:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Something went wrong</faultstring>
<faultactor>http://example.com/actor</faultactor>
<detail><Error>details</Error></detail>
</soap:Fault>
SOAP 1.2 structure:
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
<soap:Subcode>
<soap:Value>app:DatabaseError</soap:Value>
</soap:Subcode>
</soap:Code>
<soap:Reason><soap:Text xml:lang="en">Something went wrong</soap:Text></soap:Reason>
<soap:Node>http://example.com/node</soap:Node>
<soap:Role>http://example.com/role</soap:Role>
<soap:Detail><Error>details</Error></soap:Detail>
</soap:Fault>
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#subcodes ⇒ Object
readonly
Returns the value of attribute subcodes.
Instance Method Summary collapse
-
#to_s ⇒ String
Returns a human-readable summary of the fault.
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
#detail ⇒ Object (readonly)
Returns the value of attribute detail
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
#node ⇒ Object (readonly)
Returns the value of attribute node
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
#role ⇒ Object (readonly)
Returns the value of attribute role
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
#subcodes ⇒ Object (readonly)
Returns the value of attribute subcodes
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/response/fault.rb', line 53 Fault = Data.define(:code, :subcodes, :reason, :detail, :node, :role) { # Returns a human-readable summary of the fault. # # @return [String] fault summary def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end } |
Instance Method Details
#to_s ⇒ String
Returns a human-readable summary of the fault.
57 58 59 60 61 |
# File 'lib/wsdl/response/fault.rb', line 57 def to_s = "(#{code}) #{reason}" << " [role: #{role}]" if role end |