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.
66 67 68 69 70 71 72 73 |
# File 'lib/savon/client.rb', line 66 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.
40 41 42 |
# File 'lib/savon/client.rb', line 40 def error_handling @error_handling end |
.response_process ⇒ Object
Accessor for the default response block.
37 38 39 |
# File 'lib/savon/client.rb', line 37 def response_process @response_process end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the Net::HTTPResponse of the last SOAP request.
54 55 56 |
# File 'lib/savon/client.rb', line 54 def response @response end |
#wsdl ⇒ Object (readonly)
Returns the Savon::WSDL.
51 52 53 |
# File 'lib/savon/client.rb', line 51 def wsdl @wsdl end |
Instance Method Details
#respond_to?(method) ⇒ Boolean
Behaves as usual, but also returns true
for available SOAP actions.
57 58 59 60 |
# File 'lib/savon/client.rb', line 57 def respond_to?(method) return true if @wsdl.soap_actions.include? method super end |