Class: Savon::Client
Overview
Savon::Client
Heavy metal Ruby SOAP client library. Minimizes the overhead of working with SOAP services and XML.
Class Attribute Summary collapse
-
.error_handling ⇒ Object
Accessor for the default error handling.
-
.response_process ⇒ Object
Accessor for the default response block.
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the Net::HTTPResponse of the last SOAP request.
-
#wsdl ⇒ Object
readonly
Returns the Savon::WSDL.
Instance Method Summary collapse
-
#initialize(endpoint) ⇒ Client
constructor
Expects a SOAP
endpoint
String. -
#respond_to?(method) ⇒ Boolean
Behaves as usual, but also returns
true
for available SOAP actions.
Methods included from Validation
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
Behaves as usual, but dispatches SOAP requests to SOAP actions matching the given method
name.
65 66 67 68 69 70 71 72 |
# File 'lib/savon/client.rb', line 65 def method_missing(method, *args, &block) #:doc: soap_action = @wsdl.mapped_soap_actions[method] super unless soap_action soap_body, = args[0] || {}, args[1] || {} validate_arguments! soap_body, , block dispatch soap_action, soap_body, , block end |
Class Attribute Details
.error_handling ⇒ Object
Accessor for the default error handling.
39 40 41 |
# File 'lib/savon/client.rb', line 39 def error_handling @error_handling end |
.response_process ⇒ Object
Accessor for the default response block.
36 37 38 |
# File 'lib/savon/client.rb', line 36 def response_process @response_process end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the Net::HTTPResponse of the last SOAP request.
53 54 55 |
# File 'lib/savon/client.rb', line 53 def response @response end |
#wsdl ⇒ Object (readonly)
Returns the Savon::WSDL.
50 51 52 |
# File 'lib/savon/client.rb', line 50 def wsdl @wsdl end |
Instance Method Details
#respond_to?(method) ⇒ Boolean
Behaves as usual, but also returns true
for available SOAP actions.
56 57 58 59 |
# File 'lib/savon/client.rb', line 56 def respond_to?(method) return true if @wsdl.soap_actions.include? method super end |