Class: Savon::WSDL
Overview
Savon::WSDL
Represents a WSDL document.
Instance Method Summary collapse
-
#initialize(request) ⇒ WSDL
constructor
Expects a Savon::Request object.
-
#namespace_uri ⇒ Object
Returns the namespace URI from the WSDL.
-
#respond_to?(method) ⇒ Boolean
Returns
true
for available methods and SOAP actions. -
#soap_actions ⇒ Object
Returns a Hash of available SOAP actions mapped to snake_case (keys) and their original names and inputs in another Hash (values).
-
#to_s ⇒ Object
Returns the WSDL document.
Constructor Details
#initialize(request) ⇒ WSDL
Expects a Savon::Request object.
9 10 11 |
# File 'lib/savon/wsdl.rb', line 9 def initialize(request) @request = request end |
Instance Method Details
#namespace_uri ⇒ Object
Returns the namespace URI from the WSDL.
14 15 16 |
# File 'lib/savon/wsdl.rb', line 14 def namespace_uri @namespace_uri ||= parse_namespace_uri end |
#respond_to?(method) ⇒ Boolean
Returns true
for available methods and SOAP actions.
27 28 29 30 |
# File 'lib/savon/wsdl.rb', line 27 def respond_to?(method) return true if soap_actions.keys.include? method super end |
#soap_actions ⇒ Object
Returns a Hash of available SOAP actions mapped to snake_case (keys) and their original names and inputs in another Hash (values).
20 21 22 23 24 |
# File 'lib/savon/wsdl.rb', line 20 def soap_actions @soap_actions ||= parse_soap_operations.inject({}) do |hash, (input, action)| hash.merge input.snakecase.to_sym => { :name => action, :input => input } end end |
#to_s ⇒ Object
Returns the WSDL document.
33 34 35 |
# File 'lib/savon/wsdl.rb', line 33 def to_s wsdl_response.body end |